提交 6a5831c4 编写于 作者: Z zyyang

change

上级 7ffbb655
...@@ -14,12 +14,11 @@ ...@@ -14,12 +14,11 @@
*****************************************************************************/ *****************************************************************************/
package com.taosdata.jdbc; package com.taosdata.jdbc;
import javax.management.OperationsException;
import java.sql.SQLException; import java.sql.SQLException;
public class TSDBSubscribe { public class TSDBSubscribe {
private TSDBJNIConnector connecter = null; private final TSDBJNIConnector connecter;
private long id = 0; private final long id;
TSDBSubscribe(TSDBJNIConnector connecter, long id) throws SQLException { TSDBSubscribe(TSDBJNIConnector connecter, long id) throws SQLException {
if (null != connecter) { if (null != connecter) {
......
...@@ -13,7 +13,6 @@ import java.util.HashMap; ...@@ -13,7 +13,6 @@ import java.util.HashMap;
import java.util.Properties; import java.util.Properties;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class ResultSetTest { public class ResultSetTest {
static Connection connection; static Connection connection;
......
...@@ -48,7 +48,6 @@ public class SubscribeTest { ...@@ -48,7 +48,6 @@ public class SubscribeTest {
@Test @Test
public void subscribe() { public void subscribe() {
try { try {
String rawSql = "select * from " + dbName + "." + tName + ";"; String rawSql = "select * from " + dbName + "." + tName + ";";
System.out.println(rawSql); System.out.println(rawSql);
TSDBSubscribe subscribe = ((TSDBConnection) connection).subscribe(topic, rawSql, false); TSDBSubscribe subscribe = ((TSDBConnection) connection).subscribe(topic, rawSql, false);
...@@ -67,10 +66,10 @@ public class SubscribeTest { ...@@ -67,10 +66,10 @@ public class SubscribeTest {
if (a >= 2) { if (a >= 2) {
break; break;
} }
// resSet.close(); resSet.close();
} }
subscribe.close(true); subscribe.close(false);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册