nizhikov commented on a change in pull request #6923: IGNITE-12214: Continuous
query system view.
URL: https://github.com/apache/ignite/pull/6923#discussion_r330965444
##########
File path:
modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/metric/SqlViewExporterSpiTest.java
##########
@@ -332,6 +335,80 @@ public void testTransactions() throws Exception {
assertTrue(res);
}
+ /** */
+ @Test
+ public void testContinuousQuery() throws Exception {
+ try(IgniteEx g1 = startGrid(1)) {
+ IgniteCache<Integer, Integer> cache =
ignite.createCache("cache-1");
+
+ try(QueryCursor qry = cache.query(new ContinuousQuery<>()
+ .setInitialQuery(new ScanQuery<>())
+ .setPageSize(100)
+ .setTimeInterval(1000)
+ .setLocalListener(evts -> {
+ // No-op.
+ })
+ .setRemoteFilterFactory(() -> evt -> true)
+ )) {
+ for (int i=0; i<100; i++)
+ cache.put(i, i);
+
+ List<List<?>> qrys = execute(ignite,
+ "SELECT " +
+ " CACHE_NAME, " +
+ " BUFFER_SIZE, " +
+ " INTERVAL, " +
+ " NODE_ID, " +
+ " LOCAL_LISTENER, " +
+ " REMOTE_FILTER, " +
+ " LOCAL_TRANSFORMED_LISTENER, " +
+ " REMOTE_TRANSFORMER " +
+ "FROM SYS.QUERY_CONTINUOUS");
+
+ assertEquals(1, qrys.size());
+
+ for (List<?> cq : qrys)
+ checkContinuousQuery(cq, true);
+
+ qrys = execute(g1,
+ "SELECT " +
+ " CACHE_NAME, " +
+ " BUFFER_SIZE, " +
+ " INTERVAL, " +
+ " NODE_ID, " +
+ " LOCAL_LISTENER, " +
+ " REMOTE_FILTER, " +
+ " LOCAL_TRANSFORMED_LISTENER, " +
+ " REMOTE_TRANSFORMER " +
+ "FROM SYS.QUERY_CONTINUOUS");
+
+ assertEquals(1, qrys.size());
+
+ for (List<?> cq : qrys)
+ checkContinuousQuery(cq, false);
Review comment:
No, it's not.
Here, we check data on the remote node and higher we check data on the
origin node.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services