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 00dd80f4f375fa9032e2e3430cdfb20c76eb999d..f73d4e84f5a32c252d3469ea9184955ff8172b72 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(); } }