This commit is contained in:
zyyang 2020-11-04 19:09:50 +08:00
parent 8b2e3c8251
commit e21088d57d
1 changed files with 8 additions and 4 deletions

View File

@ -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)
assertEquals("failure - should throw SQLException", "TDengine Error: Unable to establish connection", e.getMessage());
else
fail("failure - should not throw Exception");
e.printStackTrace();
if (!isTaosdActived) {
assertEquals("failure - should throw SQLException", "TDengine Error: Unable to establish connection", e.getMessage());
}
else {
fail("failure - should not throw Exception");
}
}
}
@ -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