diff --git a/src/test/java/com/alibaba/druid/bvt/pool/TestIdle3_Concurrent_MaxActive.java b/src/test/java/com/alibaba/druid/bvt/pool/TestIdle3_Concurrent_MaxActive.java index f7388db40d..68de4b8aed 100644 --- a/src/test/java/com/alibaba/druid/bvt/pool/TestIdle3_Concurrent_MaxActive.java +++ b/src/test/java/com/alibaba/druid/bvt/pool/TestIdle3_Concurrent_MaxActive.java @@ -12,6 +12,7 @@ import junit.framework.TestCase; import com.alibaba.druid.mock.MockDriver; import com.alibaba.druid.pool.DruidDataSource; +import com.alibaba.druid.stat.DruidDataSourceStatManager; public class TestIdle3_Concurrent_MaxActive extends TestCase { @@ -19,6 +20,8 @@ public class TestIdle3_Concurrent_MaxActive extends TestCase { private DruidDataSource dataSource; protected void setUp() throws Exception { + Assert.assertEquals(0, DruidDataSourceStatManager.getInstance().getDataSourceList().size()); + driver = new MockDriver(); dataSource = new DruidDataSource(); @@ -39,6 +42,7 @@ public class TestIdle3_Concurrent_MaxActive extends TestCase { protected void tearDown() throws Exception { dataSource.close(); + Assert.assertEquals(0, DruidDataSourceStatManager.getInstance().getDataSourceList().size()); } public void test_idle2() throws Exception { diff --git a/src/test/java/com/alibaba/druid/bvt/pool/TestRemoveAbandoned.java b/src/test/java/com/alibaba/druid/bvt/pool/TestRemoveAbandoned.java index 501a7806b1..c8106dd597 100644 --- a/src/test/java/com/alibaba/druid/bvt/pool/TestRemoveAbandoned.java +++ b/src/test/java/com/alibaba/druid/bvt/pool/TestRemoveAbandoned.java @@ -32,6 +32,8 @@ public class TestRemoveAbandoned extends TestCase { dataSource.setTestOnBorrow(false); dataSource.setValidationQuery("SELECT 1"); dataSource.setFilters("stat"); + + Assert.assertEquals(0, DruidDataSourceStatManager.getInstance().getDataSourceList().size()); } protected void tearDown() throws Exception {