change
This commit is contained in:
parent
7ffbb65588
commit
6a5831c438
|
@ -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;
|
||||||
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 {
|
||||||
@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 {
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue