From e49fbc8ded46a8c59e869dd96903619c7965f9b6 Mon Sep 17 00:00:00 2001 From: zyyang Date: Thu, 7 Jan 2021 11:04:43 +0800 Subject: [PATCH] change --- .../com/taosdata/jdbc/cases/ConnectWrongDatabaseTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/ConnectWrongDatabaseTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/ConnectWrongDatabaseTest.java index 00dd80f4f3..f73d4e84f5 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/ConnectWrongDatabaseTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/cases/ConnectWrongDatabaseTest.java @@ -7,13 +7,15 @@ import java.sql.SQLException; public class ConnectWrongDatabaseTest { - @Test(expected = SQLException.class) - public void connect() throws SQLException { + @Test + public void connect() { try { Class.forName("com.taosdata.jdbc.TSDBDriver"); DriverManager.getConnection("jdbc:TAOS://localhost:6030/wrong_db?user=root&password=taosdata"); } catch (ClassNotFoundException e) { e.printStackTrace(); + } catch (SQLException e) { + e.printStackTrace(); } } -- GitLab