mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
git-svn-id: http://code.alibabatech.com/svn/druid/trunk@564 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -59,9 +59,10 @@ public class TestIdel3_Concurrent extends TestCase {
|
||||
Assert.assertEquals(0, dataSource.getActiveCount());
|
||||
}
|
||||
|
||||
{
|
||||
for (int i = 0; i < 100; ++i) {
|
||||
concurrent(20);
|
||||
Assert.assertEquals(14, dataSource.getPoolingCount());
|
||||
dataSource.shrink();
|
||||
}
|
||||
|
||||
// 连续打开关闭单个连接
|
||||
@@ -89,7 +90,7 @@ public class TestIdel3_Concurrent extends TestCase {
|
||||
try {
|
||||
startLatch.await();
|
||||
Connection conn = dataSource.getConnection();
|
||||
long millis = new Random().nextInt(10) + 1000;
|
||||
long millis = new Random().nextInt(10) + 10;
|
||||
Thread.sleep(millis);
|
||||
conn.close();
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user