change
This commit is contained in:
parent
d23e74b7d9
commit
e49fbc8ded
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue