change
This commit is contained in:
parent
75d4d18c74
commit
88232e2e35
|
@ -5,21 +5,18 @@ import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.*;
|
||||||
import java.sql.ResultSet;
|
|
||||||
import java.sql.SQLException;
|
|
||||||
import java.sql.Statement;
|
|
||||||
|
|
||||||
public class FailOverTest {
|
public class FailOverTest {
|
||||||
|
|
||||||
private Connection conn;
|
private Connection conn;
|
||||||
private static final String host = "localhost";
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void before() {
|
public void before() {
|
||||||
try {
|
try {
|
||||||
Class.forName("com.taosdata.jdbc.TSDBDriver");
|
Class.forName("com.taosdata.jdbc.TSDBDriver");
|
||||||
conn = TSDBCommon.getConn(host);
|
final String url = "jdbc:TAOS://:/?user=root&password=taosdata";
|
||||||
|
conn = DriverManager.getConnection(url);
|
||||||
TSDBCommon.createDatabase(conn, "failover_test");
|
TSDBCommon.createDatabase(conn, "failover_test");
|
||||||
} catch (ClassNotFoundException | SQLException e) {
|
} catch (ClassNotFoundException | SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
Loading…
Reference in New Issue