From b5eebd099caa4bd6d69baceb06d791c7675b8aea Mon Sep 17 00:00:00 2001 From: zyyang Date: Fri, 29 Jan 2021 15:24:16 +0800 Subject: [PATCH] change --- src/connector/jdbc/pom.xml | 3 +++ .../java/com/taosdata/jdbc/cases/TaosInfoMonitorTest.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/connector/jdbc/pom.xml b/src/connector/jdbc/pom.xml index 4c1ac0f06f..5ca5e96a84 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 e8b0b9d70d..3dce0d69a6 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(); -- GitLab