Skip to content

Commit 9311712

Browse files
committed
AJ-434::add test case about PollingClient()
1 parent 009002f commit 9311712

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/com/xxdb/streaming/reverse/PollingClientReverseTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,5 +659,18 @@ protected boolean doReconnect(Site site) {
659659
MyPollingClient mpl = new MyPollingClient(HOST,10086);
660660
assertFalse(mpl.doReconnect(null));
661661
}
662+
@Test
663+
public void test_PollingClient_no_parameter() throws IOException {
664+
client = new PollingClient();
665+
TopicPoller poller1 = client.subscribe(HOST,PORT,"Trades1","subTread1",true);
666+
ArrayList<IMessage> msg1;
667+
conn.run("n=1;t=table(1..n as tag,now()+1..n as ts,rand(100.0,n) as data);" +
668+
"Trades1.append!(t)");
669+
msg1 = poller1.poll(100);
670+
assertEquals(1, msg1.size());
671+
BasicTable bt = (BasicTable) conn.run("getStreamingStat().pubTables;");
672+
System.out.println(bt.getString());
673+
client.unsubscribe(HOST,PORT,"Trades1","subTread1");
674+
}
662675

663676
}

0 commit comments

Comments
 (0)