|
@@ -82,6 +82,7 @@ public class RestMetricsPropertyProviderTest {
|
|
|
componentMetrics.put("metrics/api/cluster/summary/slots.used", new Metric("/api/cluster/summary##slots.used", false, false, false, "unitless"));
|
|
|
componentMetrics.put("metrics/api/cluster/summary/topologies", new Metric("/api/cluster/summary##topologies", false, false, false, "unitless"));
|
|
|
componentMetrics.put("metrics/api/cluster/summary/nimbus.uptime", new Metric("/api/cluster/summary##nimbus.uptime", false, false, false, "unitless"));
|
|
|
+ componentMetrics.put("metrics/api/cluster/summary/wrong.metric", new Metric(null, false, false, false, "unitless"));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -132,6 +133,7 @@ public class RestMetricsPropertyProviderTest {
|
|
|
Request request = PropertyHelper.getReadRequest(Collections.<String>emptySet());
|
|
|
|
|
|
Assert.assertEquals(1, restMetricsPropertyProvider.populateResources(Collections.singleton(resource), request, null).size());
|
|
|
+ Assert.assertNull(resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/api/cluster/summary", "wrong.metric")));
|
|
|
|
|
|
//STORM_REST_API
|
|
|
Assert.assertEquals(28.0, resource.getPropertyValue(PropertyHelper.getPropertyId("metrics/api/cluster/summary", "tasks.total")));
|