Skip to content

Commit 55e9fc9

Browse files
committed
feat(test): add active network connection gauge metrics test assertions
1 parent 4c0d11b commit 55e9fc9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

extensions/micrometer/deployment/src/test/java/io/quarkus/micrometer/deployment/binder/VertxHttpClientMetricsTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ void testWebClientMetrics() {
8989
Assertions.assertEquals("HELLO", client.post("hello"));
9090

9191
Assertions.assertNotNull(getMeter("http.client.connections").longTaskTimer());
92+
Assertions.assertNotNull(getMeter("http.client.active.connections").gauge());
9293

9394
// Body sizes
9495
double expectedBytesWritten = sizeBefore + 5;
@@ -105,6 +106,7 @@ void testWebClientMetrics() {
105106
// Because of the different tag, the timer got called a single time
106107
return getMeter("http.client.requests").timer().count() == 1;
107108
});
109+
await().until(() -> getMeter("http.client.active.connections").gauge().value() == 1);
108110

109111
Assertions.assertEquals(1, registry.find("http.client.requests")
110112
.tag("uri", "root")

0 commit comments

Comments
 (0)