Skip to content

Commit f38e863

Browse files
committed
Properly subscribe to CloseableConnectionFactory#close
Closes gh-25565
1 parent c8101f8 commit f38e863

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/r2dbc/ConnectionPoolMetricsTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void init() {
5959
@AfterEach
6060
void close() {
6161
if (this.connectionFactory != null) {
62-
this.connectionFactory.close();
62+
StepVerifier.create(this.connectionFactory.close()).verifyComplete();
6363
}
6464
}
6565

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/r2dbc/ConnectionFactoryHealthIndicatorTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void healthIndicatorWhenDatabaseUpWithConnectionValidation() {
5959
}).verifyComplete();
6060
}
6161
finally {
62-
connectionFactory.close();
62+
StepVerifier.create(connectionFactory.close()).verifyComplete();
6363
}
6464
}
6565

@@ -110,7 +110,7 @@ void healthIndicatorWhenDatabaseUpWithSuccessValidationQuery() {
110110
}).verifyComplete();
111111
}
112112
finally {
113-
connectionFactory.close();
113+
StepVerifier.create(connectionFactory.close()).verifyComplete();
114114
}
115115

116116
}
@@ -130,7 +130,7 @@ void healthIndicatorWhenDatabaseUpWithFailureValidationQuery() {
130130
}).verifyComplete();
131131
}
132132
finally {
133-
connectionFactory.close();
133+
StepVerifier.create(connectionFactory.close()).verifyComplete();
134134
}
135135
}
136136

0 commit comments

Comments
 (0)