提交 1b69e315 编写于 作者: Z zyyang

add setConfig in testCase

上级 cbc4b2bb
......@@ -63,6 +63,8 @@ public class TSDBJNIConnector {
public static native String getTsCharset();
public static native int setConfig(String config);
public boolean connect(String host, int port, String dbName, String user, String password) throws SQLException {
if (this.taos != TSDBConstants.JNI_NULL_POINTER) {
closeConnection();
......@@ -358,6 +360,5 @@ public class TSDBJNIConnector {
private native int insertLinesImp(String[] lines, long conn);
private native int setConfig(String config);
}
......@@ -19,13 +19,17 @@ public class SetConfigurationInJNITest {
@Test
public void testDebugFlag() {
try {
// init
TSDBJNIConnector.initImp(null);
TSDBJNIConnector.setOptions(0, null);
TSDBJNIConnector.setOptions(1, null);
TSDBJNIConnector.setOptions(2, null);
String tsCharset = TSDBJNIConnector.getTsCharset();
System.out.println(tsCharset);
assertEquals("", tsCharset);
TSDBJNIConnector.setConfig(debugFlagJSON);
// connect
TSDBJNIConnector jniConnector = new TSDBJNIConnector();
boolean connected = jniConnector.connect(host, 0, null, "root", "taosdata");
assertTrue(connected);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册