use of org.apache.flink.metrics.CharacterFilter in project flink by apache.
the class AbstractMetricGroupTest method testGetAllVariables.
/**
* Verifies that no {@link NullPointerException} is thrown when {@link AbstractMetricGroup#getAllVariables()} is
* called and the parent is null.
*/
@Test
public void testGetAllVariables() {
MetricRegistry registry = new MetricRegistry(MetricRegistryConfiguration.defaultMetricRegistryConfiguration());
AbstractMetricGroup group = new AbstractMetricGroup<AbstractMetricGroup<?>>(registry, new String[0], null) {
@Override
protected QueryScopeInfo createQueryServiceMetricInfo(CharacterFilter filter) {
return null;
}
@Override
protected String getGroupName(CharacterFilter filter) {
return "";
}
};
assertTrue(group.getAllVariables().isEmpty());
registry.shutdown();
}
Aggregations