From ad5474d8aaf84ded6a6d5b23a8a205e1ad2a84bd Mon Sep 17 00:00:00 2001 From: zyyang Date: Thu, 19 Nov 2020 10:49:01 +0800 Subject: [PATCH] change --- .../src/test/java/com/taosdata/jdbc/cases/FailOverTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/FailOverTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/FailOverTest.java index 2a803e0f19..83295df527 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/FailOverTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/FailOverTest.java @@ -16,7 +16,8 @@ public class FailOverTest { Class.forName("com.taosdata.jdbc.TSDBDriver"); final String url = "jdbc:TAOS://:/?user=root&password=taosdata"; - while (true) { + long end = System.currentTimeMillis() + 1000 * 60 * 5; + while (System.currentTimeMillis() < end) { try (Connection conn = DriverManager.getConnection(url)) { Statement stmt = conn.createStatement(); ResultSet resultSet = stmt.executeQuery("select server_status()"); -- GitLab