Merge pull request #74 from wenshao/master

修正单元测试的问题
This commit is contained in:
温高铁
2012-08-26 05:21:19 -07:00
@@ -68,8 +68,15 @@ public class DruidDataSourceTest_notEmptyWait extends TestCase {
threads[i].start();
}
startLatch.await(100, TimeUnit.MILLISECONDS);
startLatch.await(10, TimeUnit.MILLISECONDS);
for (int i = 0; i < 100; ++i) {
if (dataSource.getNotEmptyWaitThreadCount() == 10) {
break;
}
Thread.sleep(10);
}
Assert.assertEquals(10, dataSource.getNotEmptyWaitThreadCount());
Assert.assertEquals(10, dataSource.getNotEmptyWaitThreadPeak());