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@601 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
@@ -48,8 +48,8 @@ public class TestIdle3_Concurrent extends TestCase {
|
||||
|
||||
conn.close();
|
||||
Assert.assertEquals(0, dataSource.getDestroyCount());
|
||||
Assert.assertEquals(2, driver.getConnections().size());
|
||||
Assert.assertEquals(2, dataSource.getCreateCount());
|
||||
Assert.assertEquals(1, driver.getConnections().size());
|
||||
Assert.assertEquals(1, dataSource.getCreateCount());
|
||||
Assert.assertEquals(0, dataSource.getActiveCount());
|
||||
}
|
||||
|
||||
|
||||
@@ -61,8 +61,9 @@ public class TestIdle3_Concurrent_MaxActive extends TestCase {
|
||||
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
concurrent(200);
|
||||
Assert.assertEquals("" + i, dataSource.getMaxActive(), dataSource.getPoolingCount());
|
||||
Assert.assertEquals(dataSource.getMaxActive(), dataSource.getPoolingCount());
|
||||
dataSource.shrink();
|
||||
Assert.assertEquals(dataSource.getMinIdle(), dataSource.getPoolingCount());
|
||||
}
|
||||
|
||||
// 连续打开关闭单个连接
|
||||
@@ -90,7 +91,7 @@ public class TestIdle3_Concurrent_MaxActive extends TestCase {
|
||||
try {
|
||||
startLatch.await();
|
||||
Connection conn = dataSource.getConnection();
|
||||
long millis = new Random().nextInt(5) + 5;
|
||||
long millis = new Random().nextInt(5) + 10;
|
||||
Thread.sleep(millis);
|
||||
conn.close();
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user