tony810430 commented on a change in pull request #7398: [FLINK-11251] [metrics] 
GenericValueMetricGroup should always ignore its group name in logical scope
URL: https://github.com/apache/flink/pull/7398#discussion_r244705142
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/metrics/groups/MetricGroupTest.java
 ##########
 @@ -216,6 +219,28 @@ public void testNameCollisionAfterKeyValueGroup() {
                assertFalse("Value is present in logical scope.", 
logicalScope.contains(value));
        }
 
+       /**
+        * Verifies that calling {@link 
AbstractMetricGroup#getLogicalScope(CharacterFilter, char, int)} on {@link 
GenericValueMetricGroup}
+        * should ignore value as well.
+        */
+       @Test
+       public void testLogicalScopeShouldIgnoreValueGroupName() {
+               Configuration config = new Configuration();
+               config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + 
"test." + ConfigConstants.METRICS_REPORTER_CLASS_SUFFIX, 
TestReporter.class.getName());
+               MetricRegistryImpl registry = new 
MetricRegistryImpl(MetricRegistryConfiguration.fromConfiguration(config));
 
 Review comment:
   Do you mean `registry` should be shutdown in `finally` clause?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to