Replace Boot's own metrics with support for Micrometer
Closes gh-9970
This commit is contained in:
committed by
Andy Wilkinson
parent
306c8d0ae2
commit
c2958c27ab
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user