[TD-2286]<fix>: fix wrong error message when connect unexists databases

This commit is contained in:
zyyang 2021-01-07 10:59:43 +08:00
parent 251f9d0836
commit 393de69648
1 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package com.taosdata.jdbc.cases;
import org.junit.Test;
import java.sql.DriverManager;
import java.sql.SQLException;
public class ConnectWrongDatabaseTest {
@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();
}
}
}