From notifications-return-6821-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Fri Sep 13 09:20:51 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5C8E6180652 for ; Fri, 13 Sep 2019 11:20:51 +0200 (CEST) Received: (qmail 84822 invoked by uid 500); 13 Sep 2019 09:20:50 -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 84808 invoked by uid 99); 13 Sep 2019 09:20:50 -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; Fri, 13 Sep 2019 09:20:50 +0000 From: GitBox To: notifications@ignite.apache.org Subject: [GitHub] [ignite] alex-plekhanov commented on a change in pull request #6845: IGNITE-12145: Monitoring list engine. Message-ID: <156836645072.13520.8605265272791136823.gitbox@gitbox.apache.org> Date: Fri, 13 Sep 2019 09:20:50 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit alex-plekhanov commented on a change in pull request #6845: IGNITE-12145: Monitoring list engine. URL: https://github.com/apache/ignite/pull/6845#discussion_r324106414 ########## File path: modules/core/src/test/java/org/apache/ignite/internal/metric/JmxMetricExporterSpiTest.java ########## @@ -144,4 +210,125 @@ public void testFilterAndExport() throws Exception { assertEquals(44L, bean2.getAttribute("test3")); } + + /** */ + @Test + public void testCachesList() throws Exception { + Set cacheNames = new HashSet<>(Arrays.asList("cache-1", "cache-2")); + + for (String name : cacheNames) + ignite.createCache(name); + + TabularDataSupport data = monitoringList("caches"); + + assertEquals(3, data.size()); + + for(int i=0; i grpNames = new HashSet<>(Arrays.asList("grp-1", "grp-2")); + + for (String grpName : grpNames) + ignite.createCache(new CacheConfiguration<>("cache-" + grpName).setGroupName(grpName)); + + TabularDataSupport grps = monitoringList("cacheGroups"); + + assertEquals("ignite-sys, grp-1, grp-2", 3, grps.size()); + + for (Map.Entry entry : grps.entrySet()) { + CompositeData row = (CompositeData)entry.getValue(); + + grpNames.remove(row.get("cacheGroupName")); + } + + assertTrue(grpNames.toString(), grpNames.isEmpty()); + } + + /** */ + @Test + public void testServices() throws Exception { + ServiceConfiguration srvcCfg = new ServiceConfiguration(); + + srvcCfg.setName("service"); + srvcCfg.setMaxPerNodeCount(1); + srvcCfg.setService(new DummyService()); + + ignite.services().deploy(srvcCfg); + + TabularDataSupport srvs = monitoringList("services"); + + assertEquals(1, srvs.size()); + + CompositeData sview = srvs.get(new Object[] {0}); + + assertEquals(srvcCfg.getName(), sview.get("name")); + assertEquals(srvcCfg.getMaxPerNodeCount(), sview.get("maxPerNodeCount")); + assertEquals(DummyService.class.getName(), sview.get("serviceClass")); + } + + /** */ + @Test + public void testComputeBroadcast() throws Exception { + for (int i = 0; i < 5; i++) { + ignite.compute().broadcastAsync(() -> { + try { + Thread.sleep(3_000L); + } + catch (InterruptedException e) { + throw new RuntimeException(e); + } + }); + } + + TabularDataSupport tasks = monitoringList("tasks"); Review comment: `TASKS_MON_LIST` ---------------------------------------------------------------- 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