Commit dfec9978 by Spencer Gibb

fix failing test on travis.

parent b117030a
...@@ -12,6 +12,7 @@ import com.google.common.collect.Lists; ...@@ -12,6 +12,7 @@ import com.google.common.collect.Lists;
import com.netflix.servo.DefaultMonitorRegistry; import com.netflix.servo.DefaultMonitorRegistry;
import com.netflix.servo.MonitorRegistry; import com.netflix.servo.MonitorRegistry;
import com.netflix.servo.monitor.BasicTimer; import com.netflix.servo.monitor.BasicTimer;
import com.netflix.servo.monitor.Monitor;
import com.netflix.servo.monitor.MonitorConfig; import com.netflix.servo.monitor.MonitorConfig;
import static junit.framework.Assert.assertEquals; import static junit.framework.Assert.assertEquals;
...@@ -21,6 +22,11 @@ public class ServoMetricReaderTests extends AbstractMetricsTests { ...@@ -21,6 +22,11 @@ public class ServoMetricReaderTests extends AbstractMetricsTests {
public void singleCompositeMonitorYieldsMultipleActuatorMetrics() { public void singleCompositeMonitorYieldsMultipleActuatorMetrics() {
MonitorRegistry registry = DefaultMonitorRegistry.getInstance(); MonitorRegistry registry = DefaultMonitorRegistry.getInstance();
// deal with monitors registered in other tests
for (Monitor<?> monitor : registry.getRegisteredMonitors()) {
registry.unregister(monitor);
}
ServoMetricReader reader = new ServoMetricReader(registry, ServoMetricReader reader = new ServoMetricReader(registry,
new DimensionalServoMetricNaming()); new DimensionalServoMetricNaming());
...@@ -47,3 +53,4 @@ public class ServoMetricReaderTests extends AbstractMetricsTests { ...@@ -47,3 +53,4 @@ public class ServoMetricReaderTests extends AbstractMetricsTests {
metricNames.get(3)); metricNames.get(3));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment