Search in sources :

Example 11 with MetricFilter

use of com.kixeye.chassis.support.metrics.MetricFilter in project chassis by Kixeye.

the class MetricsGraphiteConfigurationTest method testUpdateFilter.

@Test
public void testUpdateFilter() {
    MetricFilter filter = metricsGraphiteConfiguration.getReporterLoader().getFilter();
    Assert.assertEquals("foo=bar", filter.getStringValue());
    ConfigurationManager.getConfigInstance().setProperty(removePlaceholder(MetricsGraphiteReporterLoader.METRICS_GRAPHITE_FILTER_PROPERTY_NAME), "foo=baz");
    Assert.assertNotEquals(filter, metricsGraphiteConfiguration.getReporterLoader().getFilter());
    Assert.assertEquals("foo=baz", metricsGraphiteConfiguration.getReporterLoader().getFilter().getStringValue());
}
Also used : MetricFilter(com.kixeye.chassis.support.metrics.MetricFilter) Test(org.junit.Test)

Aggregations

MetricFilter (com.kixeye.chassis.support.metrics.MetricFilter)11 Test (org.junit.Test)10 Metric (com.codahale.metrics.Metric)8