diff --git a/src/connector/jdbc/pom.xml b/src/connector/jdbc/pom.xml index 4c1ac0f06f48a7eeaab054962cc60c870e014e1c..5ca5e96a84157def62292756c4949bbe2c904500 100755 --- a/src/connector/jdbc/pom.xml +++ b/src/connector/jdbc/pom.xml @@ -36,6 +36,7 @@ 3.6.0 1.1.2 3.5 + @@ -122,6 +123,8 @@ maven-surefire-plugin 2.12.4 + pretest + ${maven.test.jvmargs} **/*Test.java diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/TaosInfoMonitorTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/TaosInfoMonitorTest.java index e8b0b9d70d1e97b036bed4d4a30b03f88ee3be1d..3dce0d69a696ab922992d1004b3cde7c596b3872 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/TaosInfoMonitorTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/TaosInfoMonitorTest.java @@ -13,9 +13,8 @@ import java.util.stream.IntStream; public class TaosInfoMonitorTest { @Test - public void testCreateTooManyConnection() throws ClassNotFoundException, SQLException, InterruptedException { + public void testCreateTooManyConnection() throws ClassNotFoundException { Class.forName("com.taosdata.jdbc.TSDBDriver"); - int conCnt = 0; final String url = "jdbc:TAOS://127.0.0.1:6030/?user=root&password=taosdata"; List connectionList = IntStream.range(0, 100).mapToObj(i -> { @@ -27,6 +26,7 @@ public class TaosInfoMonitorTest { } return null; }).collect(Collectors.toList()); + connectionList.stream().forEach(conn -> { try { conn.close();