nizhikov commented on a change in pull request #7332: IGNITE-12598: Cache 
metrics configuration should be removed only on cache destroy
URL: https://github.com/apache/ignite/pull/7332#discussion_r375255939
 
 

 ##########
 File path: 
modules/core/src/test/java/org/apache/ignite/internal/metric/CacheMetricsAddRemoveTest.java
 ##########
 @@ -82,17 +98,58 @@ public void testCacheMetricsAddRemove() throws Exception {
         checkMetricsEmpty(cachePrefix);
     }
 
+    /** */
+    @Test
+    public void testCacheMetricsNotRemovedOnStop() throws Exception {
+        String cachePrefix = cacheMetricsRegistryName("other-cache", false);
+
+        checkMetricsEmpty(cachePrefix);
+
+        createCache("persisted", "other-cache");
+
+        grid("client").cache("other-cache").put(1L, 1L);
+
+        checkMetricsNotEmpty(cachePrefix);
+
+        //Cache will be stopped during deactivation.
+        grid("client").cluster().state(ClusterState.INACTIVE);
+
+        checkMetricsNotEmpty(cachePrefix);
+
+        grid("client").cluster().state(ClusterState.ACTIVE);
+
+        assertEquals(1L, grid("client").cache("other-cache").get(1L));
+
+        checkMetricsNotEmpty(cachePrefix);
+
+        destroyCache();
 
 Review comment:
   Fixed.

----------------------------------------------------------------
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

Reply via email to