tillrohrmann commented on a change in pull request #10466: [FLINK-15110][metrics] Support variable exclusion URL: https://github.com/apache/flink/pull/10466#discussion_r354935252
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/metrics/groups/AbstractMetricGroupTest.java ########## @@ -71,6 +76,17 @@ protected String getGroupName(CharacterFilter filter) { registry.shutdown().get(); } + @Test + public void testGetAllVariablesWithExclusions() { + MetricRegistry registry = NoOpMetricRegistry.INSTANCE; + + AbstractMetricGroup<?> group1 = new ProcessMetricGroup(registry, "host"); + assertThat(group1.getAllVariables(), IsMapContaining.hasKey(ScopeFormat.SCOPE_HOST)); + + AbstractMetricGroup<?> group2 = new ProcessMetricGroup(registry, "host"); + assertEquals(group2.getAllVariables(-1, Collections.singleton(ScopeFormat.SCOPE_HOST)).size(), 0); Review comment: I would suggest to make this a separate test case. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services