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 3c77803c5565f8950a78624d7a1c0bb04eec9dae..e8b0b9d70d1e97b036bed4d4a30b03f88ee3be1d 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 @@ -20,8 +20,9 @@ public class TaosInfoMonitorTest { List connectionList = IntStream.range(0, 100).mapToObj(i -> { try { + TimeUnit.SECONDS.sleep(1); return DriverManager.getConnection(url); - } catch (SQLException e) { + } catch (SQLException | InterruptedException e) { e.printStackTrace(); } return null; @@ -29,7 +30,8 @@ public class TaosInfoMonitorTest { connectionList.stream().forEach(conn -> { try { conn.close(); - } catch (SQLException e) { + TimeUnit.SECONDS.sleep(1); + } catch (SQLException | InterruptedException e) { e.printStackTrace(); } });