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 f4072d036d..26f332dec8 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 @@ -34,12 +34,16 @@ public class TestIdle3_Concurrent_MaxActive extends TestCase { dataSource.setTestOnBorrow(false); dataSource.setValidationQuery("SELECT 1"); dataSource.setFilters("stat"); - } - - public void test_idle2() throws Exception { ManagementFactory.getPlatformMBeanServer().registerMBean(dataSource, new ObjectName("com.alibaba:type=DataSource")); + } + + protected void tearDown() throws Exception { + ManagementFactory.getPlatformMBeanServer().unregisterMBean(new ObjectName("com.alibaba:type=DataSource")); + } + + public void test_idle2() throws Exception { // 第一次创建连接 {