This is no longer necessary as of micrometer 1.0 rc5
pull/11527/head
Stephane Nicoll 7 years ago
parent 311e0aed4a
commit 1962cbb623

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2017 the original author or authors. * Copyright 2012-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -77,7 +77,6 @@ public class MetricsEndpointTests {
this.registry.counter("cache", "result", "hit", "host", "1").increment(2); this.registry.counter("cache", "result", "hit", "host", "1").increment(2);
this.registry.counter("cache", "result", "miss", "host", "1").increment(2); this.registry.counter("cache", "result", "miss", "host", "1").increment(2);
this.registry.counter("cache", "result", "hit", "host", "2").increment(2); this.registry.counter("cache", "result", "hit", "host", "2").increment(2);
MockClock.clock(this.registry).add(SimpleConfig.DEFAULT_STEP);
MetricsEndpoint.MetricResponse response = this.endpoint.metric("cache", MetricsEndpoint.MetricResponse response = this.endpoint.metric("cache",
Collections.emptyList()); Collections.emptyList());
assertThat(response.getName()).isEqualTo("cache"); assertThat(response.getName()).isEqualTo("cache");
@ -91,7 +90,6 @@ public class MetricsEndpointTests {
@Test @Test
public void metricWithSpaceInTagValue() { public void metricWithSpaceInTagValue() {
this.registry.counter("counter", "key", "a space").increment(2); this.registry.counter("counter", "key", "a space").increment(2);
MockClock.clock(this.registry).add(SimpleConfig.DEFAULT_STEP);
MetricsEndpoint.MetricResponse response = this.endpoint.metric("counter", MetricsEndpoint.MetricResponse response = this.endpoint.metric("counter",
Collections.singletonList("key:a space")); Collections.singletonList("key:a space"));
assertThat(response.getName()).isEqualTo("counter"); assertThat(response.getName()).isEqualTo("counter");

Loading…
Cancel
Save