提交 38459ed3 编写于 作者: Z zyyang

change

上级 7be93e19
...@@ -5,24 +5,24 @@ import com.taosdata.jdbc.utils.TDNodes; ...@@ -5,24 +5,24 @@ import com.taosdata.jdbc.utils.TDNodes;
import org.junit.AfterClass; import org.junit.AfterClass;
import org.junit.BeforeClass; import org.junit.BeforeClass;
public class BaseTest { public abstract class BaseTest {
private static boolean testCluster = false; private static boolean testCluster = false;
private static TDNodes nodes = new TDNodes(); private static TDNodes nodes = new TDNodes();
@BeforeClass @BeforeClass
public static void setupEnv() { public static void setupEnv() {
try{ try {
if (nodes.getTDNode(1).getTaosdPid() != null) { if (nodes.getTDNode(1).getTaosdPid() != null) {
System.out.println("Kill taosd before running JDBC test"); System.out.println("Kill taosd before running JDBC test");
nodes.getTDNode(1).setRunning(1); nodes.getTDNode(1).setRunning(1);
nodes.stop(1); nodes.stop(1);
} }
nodes.setTestCluster(testCluster); nodes.setTestCluster(testCluster);
nodes.deploy(1); nodes.deploy(1);
nodes.start(1); nodes.start(1);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
......
package com.taosdata.jdbc.cases; package com.taosdata.jdbc.cases;
import org.junit.After;
import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import java.sql.*; import java.sql.*;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册