diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBDriverTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBDriverTest.java index db05c57b5874a7f870118b96c4746e4ae9b4be95..8718c3e7dad8a04c420372ac0f6902faae4f5cff 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBDriverTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/TSDBDriverTest.java @@ -136,10 +136,8 @@ public class TSDBDriverTest { assertNotNull("failure - connection should not be null", conn); } } catch (SQLException e) { - e.printStackTrace(); if (!isTaosdActived) { - System.out.println(e.getMessage()); - assertEquals("failure - should throw SQLException", "TDengine Error: Unable to establish connection", e.getMessage()); + assertEquals("failure - should throw SQLException", SQLException.class, e.getClass()); } else { fail("failure - should not throw Exception"); }