去掉多余代码

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@601 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-09-02 18:35:06 +00:00
parent 73e4e39a63
commit 657889db5f
4 changed files with 137 additions and 55 deletions
@@ -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) {