Skip to content

Commit

Permalink
Fix auto detect backend metrics unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
namannandan committed Nov 13, 2023
1 parent 77b0a2b commit d65e312
Showing 1 changed file with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,7 @@ public void testMetricCacheLoadValidConfiguration() {
}

@Test
public void testMetricCacheAddAutoDetectMetricBackendWithoutType() {
MetricCache metricCache = MetricCache.getInstance();
Metric metric =
new Metric(
"TestMetricWithoutType",
"5.0",
"count",
null,
"test-host",
new Dimension("ModelName", "mnist"),
new Dimension("Level", "model"));
metricCache.addAutoDetectMetricBackend(metric);
IMetric cachedMetric = metricCache.getMetricBackend("TestMetricWithoutType");
Assert.assertEquals(cachedMetric.type, MetricBuilder.MetricType.COUNTER);
Assert.assertEquals(cachedMetric.name, "TestMetricWithoutType");
Assert.assertEquals(cachedMetric.unit, "count");
Assert.assertEquals(
cachedMetric.dimensionNames, Arrays.asList("ModelName", "Level", "Hostname"));
}

@Test
public void testMetricCacheAddAutoDetectMetricBackendWithType() {
public void testMetricCacheAddAutoDetectMetricBackend() {
MetricCache metricCache = MetricCache.getInstance();
Metric metric =
new Metric(
Expand Down

0 comments on commit d65e312

Please sign in to comment.