You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2019/01/25 16:40:28 UTC

[GitHub] AMashenkov commented on a change in pull request #5778: IGNITE-5983: Enable obtaining memory policy metrics via REST.

AMashenkov commented on a change in pull request #5778: IGNITE-5983: Enable obtaining memory policy metrics via REST.
URL: https://github.com/apache/ignite/pull/5778#discussion_r251051201
 
 

 ##########
 File path: modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
 ##########
 @@ -1975,6 +1979,54 @@ public void testVisorGateway() throws Exception {
         jsonTaskResult(ret);
     }
 
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testDataRegionMetrics() throws Exception {
+        String ret = content(F.asMap("cmd", GridRestCommand.DATA_REGION_METRICS.key()));
+
+        JsonNode res = validateJsonResponse(ret);
+
+        assertTrue(res.size() > 0);
+
+        info(GridRestCommand.DATA_REGION_METRICS.key().toUpperCase() + " command result: " + ret);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testDataStorageMetricsDisabled() throws Exception {
+        String ret = content(F.asMap("cmd", GridRestCommand.DATA_STORAGE_METRICS.key()));
+
+        JsonNode res = validateJsonResponse(ret);
+
+        assertTrue(res.asText().equalsIgnoreCase("Storage metrics are not enabled"));
+
+        info(GridRestCommand.DATA_STORAGE_METRICS.key().toUpperCase() + " command result: " + ret);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testDataStorageMetricsEnabled() throws Exception {
+        stopAllGrids();
+
+        memoryMetricsEnabled = true;
 
 Review comment:
   Test execution order is not defined usually.
   Let's add additional check and restart the grid if this option has to be changed.
   Same change need to be done in testDataStorageMetricsDisabled().

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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