From 747dbc35feaa1d6b13993ba2926e30506ba5e31a Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 4 Aug 2023 14:27:29 +0200 Subject: [PATCH] Warmup connection pool in ConnectionPoolMetricsTests Closes gh-36474 --- .../boot/actuate/metrics/r2dbc/ConnectionPoolMetricsTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/r2dbc/ConnectionPoolMetricsTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/r2dbc/ConnectionPoolMetricsTests.java index bb0f1055ca..c833dd7f91 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/r2dbc/ConnectionPoolMetricsTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/r2dbc/ConnectionPoolMetricsTests.java @@ -72,6 +72,7 @@ class ConnectionPoolMetricsTests { ConnectionPoolMetrics metrics = new ConnectionPoolMetrics(connectionPool, "test-pool", Tags.of(testTag, regionTag)); metrics.bindTo(registry); + connectionPool.warmup().as(StepVerifier::create).expectNext(3).expectComplete().verify(Duration.ofSeconds(30)); // acquire two connections connectionPool.create() .as(StepVerifier::create)