Browse Source

Properly subscribe to CloseableConnectionFactory#close

Closes gh-25565
pull/25731/head
Stephane Nicoll 5 years ago
parent
commit
f38e863fbc
  1. 2
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/r2dbc/ConnectionPoolMetricsTests.java
  2. 6
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/r2dbc/ConnectionFactoryHealthIndicatorTests.java

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

@ -59,7 +59,7 @@ class ConnectionPoolMetricsTests { @@ -59,7 +59,7 @@ class ConnectionPoolMetricsTests {
@AfterEach
void close() {
if (this.connectionFactory != null) {
this.connectionFactory.close();
StepVerifier.create(this.connectionFactory.close()).verifyComplete();
}
}

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

@ -59,7 +59,7 @@ class ConnectionFactoryHealthIndicatorTests { @@ -59,7 +59,7 @@ class ConnectionFactoryHealthIndicatorTests {
}).verifyComplete();
}
finally {
connectionFactory.close();
StepVerifier.create(connectionFactory.close()).verifyComplete();
}
}
@ -110,7 +110,7 @@ class ConnectionFactoryHealthIndicatorTests { @@ -110,7 +110,7 @@ class ConnectionFactoryHealthIndicatorTests {
}).verifyComplete();
}
finally {
connectionFactory.close();
StepVerifier.create(connectionFactory.close()).verifyComplete();
}
}
@ -130,7 +130,7 @@ class ConnectionFactoryHealthIndicatorTests { @@ -130,7 +130,7 @@ class ConnectionFactoryHealthIndicatorTests {
}).verifyComplete();
}
finally {
connectionFactory.close();
StepVerifier.create(connectionFactory.close()).verifyComplete();
}
}

Loading…
Cancel
Save