This commit is contained in:
zyyang 2021-01-07 11:04:43 +08:00
parent d23e74b7d9
commit e49fbc8ded
1 changed files with 4 additions and 2 deletions

View File

@ -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();
}
}