提交 bc530df2 编写于 作者: Z zyyang

add setConfig api test case

上级 03f41151
...@@ -357,4 +357,7 @@ public class TSDBJNIConnector { ...@@ -357,4 +357,7 @@ public class TSDBJNIConnector {
} }
private native int insertLinesImp(String[] lines, long conn); private native int insertLinesImp(String[] lines, long conn);
private native int setConfig(String config);
} }
package com.taosdata.jdbc;
import org.junit.Test;
public class SetConfigurationInJNITest {
@Test
public void test() {
}
}
...@@ -5,7 +5,6 @@ import org.junit.Test; ...@@ -5,7 +5,6 @@ import org.junit.Test;
import java.lang.management.ManagementFactory; import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean; import java.lang.management.RuntimeMXBean;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.SQLWarning;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -19,7 +18,6 @@ public class TSDBJNIConnectorTest { ...@@ -19,7 +18,6 @@ public class TSDBJNIConnectorTest {
@Test @Test
public void test() { public void test() {
try { try {
try { try {
//change sleepSeconds when debugging with attach to process to find PID //change sleepSeconds when debugging with attach to process to find PID
int sleepSeconds = -1; int sleepSeconds = -1;
...@@ -122,8 +120,6 @@ public class TSDBJNIConnectorTest { ...@@ -122,8 +120,6 @@ public class TSDBJNIConnectorTest {
// close connection // close connection
connector.closeConnection(); connector.closeConnection();
} catch (SQLWarning throwables) {
throwables.printStackTrace();
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -140,11 +136,7 @@ public class TSDBJNIConnectorTest { ...@@ -140,11 +136,7 @@ public class TSDBJNIConnectorTest {
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_JNI_RESULT_SET_NULL); throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_JNI_RESULT_SET_NULL);
} else if (code == TSDBConstants.JNI_NUM_OF_FIELDS_0) { } else if (code == TSDBConstants.JNI_NUM_OF_FIELDS_0) {
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_JNI_NUM_OF_FIELDS_0); throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_JNI_NUM_OF_FIELDS_0);
} else if (code == TSDBConstants.JNI_FETCH_END) { } else return code != TSDBConstants.JNI_FETCH_END;
return false;
} else {
return true;
}
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册