Replace Boot's own metrics with support for Micrometer

Closes gh-9970
This commit is contained in:
Jon Schneider
2017-09-10 22:59:45 -05:00
committed by Andy Wilkinson
parent 306c8d0ae2
commit c2958c27ab
247 changed files with 4907 additions and 15273 deletions

View File

@@ -89,6 +89,7 @@ public class SampleActuatorApplicationTests {
assertThat(body.get("message")).isEqualTo("Hello Phil");
}
@SuppressWarnings("unchecked")
@Test
public void testMetrics() throws Exception {
testHome(); // makes sure some requests have been made
@@ -97,9 +98,10 @@ public class SampleActuatorApplicationTests {
.withBasicAuth("user", getPassword())
.getForEntity("/application/metrics", Map.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
@SuppressWarnings("unchecked")
Map<String, Object> body = entity.getBody();
assertThat(body).containsKey("counter.status.200.root");
assertThat(body).containsKey("names");
assertThat((List<String>) body.get("names")).contains("jvm.buffer.count");
}
@Test