Fixes TestMetrics filter bug.

Previously, this matches implementation was ignoring the `name` passed
in and instead comparing the *literal* `"testMetricWait.pool.Wait"` to
the dynamically-created
`MetricRegistry.name("testMetricWait", "pool", "Wait")`.

This commit updates the matches implementation to instead compare the
`name` passed in.

This brings it in line with the other implementations in the same file.
pull/1962/head
Chris Pennello 3 years ago
parent a7d9136629
commit 07e40c20ab
No known key found for this signature in database
GPG Key ID: B51FFE896EBA94B1

@ -71,7 +71,7 @@ public class TestMetrics
@Override
public boolean matches(String name, Metric metric)
{
return "testMetricWait.pool.Wait".equals(MetricRegistry.name("testMetricWait", "pool", "Wait"));
return name.equals(MetricRegistry.name("testMetricWait", "pool", "Wait"));
}
}).values().iterator().next();

Loading…
Cancel
Save