From notifications-return-7162-apmail-ignite-notifications-archive=ignite.apache.org@ignite.apache.org Thu Oct 3 10:15:33 2019 Return-Path: X-Original-To: apmail-ignite-notifications-archive@minotaur.apache.org Delivered-To: apmail-ignite-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 5481C188E8 for ; Thu, 3 Oct 2019 10:15:33 +0000 (UTC) Received: (qmail 20059 invoked by uid 500); 3 Oct 2019 10:15:32 -0000 Delivered-To: apmail-ignite-notifications-archive@ignite.apache.org Received: (qmail 20043 invoked by uid 500); 3 Oct 2019 10:15:32 -0000 Mailing-List: contact notifications-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list notifications@ignite.apache.org Received: (qmail 20033 invoked by uid 99); 3 Oct 2019 10:15:32 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Oct 2019 10:15:32 +0000 From: GitBox To: notifications@ignite.apache.org Subject: [GitHub] [ignite] nizhikov commented on a change in pull request #6923: IGNITE-12214: Continuous query system view. Message-ID: <157009773270.8847.2096337594161756021.gitbox@gitbox.apache.org> Date: Thu, 03 Oct 2019 10:15:32 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit nizhikov commented on a change in pull request #6923: IGNITE-12214: Continuous query system view. URL: https://github.com/apache/ignite/pull/6923#discussion_r330964275 ########## File path: modules/core/src/test/java/org/apache/ignite/internal/metric/SystemViewSelfTest.java ########## @@ -461,6 +466,59 @@ public void testClientsConnections() throws Exception { } } + /** */ + @Test + public void testContinuousQuery() throws Exception { + try(IgniteEx g0 = startGrid(0); IgniteEx g1 = startGrid(1)) { + IgniteCache cache = g0.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); + + SystemView qrys = g0.context().systemView().view(CQ_SYS_VIEW); + + assertEquals(1, qrys.size()); + + for (ContinuousQueryView cq : qrys) + checkContinuousQueryView(g0, cq, true); + + qrys = g1.context().systemView().view(CQ_SYS_VIEW); + + assertEquals(1, qrys.size()); + + for (ContinuousQueryView cq : qrys) + checkContinuousQueryView(g0, 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: users@infra.apache.org With regards, Apache Git Services