From e21088d57d23dc13017f69fd1416018b456cf3ea Mon Sep 17 00:00:00 2001 From: zyyang Date: Wed, 4 Nov 2020 19:09:50 +0800 Subject: [PATCH] change --- .../test/java/com/taosdata/jdbc/TSDBDriverTest.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 69fdeba110..e34531bddf 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 @@ -115,6 +115,7 @@ public class TSDBDriverTest { assertNotNull("failure - connection should not be null", conn); } } catch (SQLException e) { + e.printStackTrace(); if (!isTaosdActived) assertEquals("failure - should throw SQLException", "TDengine Error: Unable to establish connection", e.getMessage()); else @@ -135,11 +136,13 @@ public class TSDBDriverTest { assertNotNull("failure - connection should not be null", conn); } } catch (SQLException e) { - if (!isTaosdActived) + e.printStackTrace(); + if (!isTaosdActived) { assertEquals("failure - should throw SQLException", "TDengine Error: Unable to establish connection", e.getMessage()); - else + } + else { fail("failure - should not throw Exception"); - e.printStackTrace(); + } } } @@ -157,6 +160,7 @@ public class TSDBDriverTest { assertNotNull("failure - connection should not be null", conn); } } catch (SQLException e) { + e.printStackTrace(); if (!isTaosdActived) assertEquals("failure - should throw SQLException", "TDengine Error: Unable to establish connection", e.getMessage()); else -- GitLab