Skip to content

Commit d4a8804

Browse files
committed
Upgrade to R2DBC Bom Borca-SR2
Closes gh-32328
1 parent 24ab4e8 commit d4a8804

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/r2dbc/R2dbcAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void configureWithUrlAndDefaultDoNotOverrideDefaultTimeouts() {
9393
assertThat(context).hasSingleBean(ConnectionFactory.class).hasSingleBean(ConnectionPool.class)
9494
.hasSingleBean(R2dbcProperties.class);
9595
ConnectionPool connectionPool = context.getBean(ConnectionPool.class);
96-
assertThat(connectionPool).hasFieldOrPropertyWithValue("maxAcquireTime", Duration.ofNanos(-1));
96+
assertThat(connectionPool).hasFieldOrPropertyWithValue("maxAcquireTime", Duration.ofMillis(-1));
9797
});
9898
}
9999

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ bom {
14071407
]
14081408
}
14091409
}
1410-
library("R2DBC Bom", "Borca-SR1") {
1410+
library("R2DBC Bom", "Borca-SR2") {
14111411
group("io.r2dbc") {
14121412
imports = [
14131413
"r2dbc-bom"

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/r2dbc/ConnectionFactoryBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ ConnectionPoolConfiguration connectionPoolConfiguration(ConnectionFactoryOptions
244244
.to(builder::maxIdleTime);
245245
map.from(options.getValue(PoolingConnectionFactoryProvider.MAX_CREATE_CONNECTION_TIME)).as(this::toDuration)
246246
.to(builder::maxCreateConnectionTime);
247+
map.from(options.getValue(PoolingConnectionFactoryProvider.MAX_VALIDATION_TIME)).as(this::toDuration)
248+
.to(builder::maxValidationTime);
249+
map.from(options.getValue(PoolingConnectionFactoryProvider.MIN_IDLE)).as(this::toInteger)
250+
.to(builder::minIdle);
247251
map.from(options.getValue(PoolingConnectionFactoryProvider.POOL_NAME)).as(this::toString).to(builder::name);
248252
map.from(options.getValue(PoolingConnectionFactoryProvider.PRE_RELEASE)).to((function) -> builder
249253
.preRelease((Function<? super Connection, ? extends Publisher<Void>>) function));

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/r2dbc/ConnectionFactoryBuilderTests.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,11 @@ private enum ExpectedOption {
265265
MAX_CREATE_CONNECTION_TIME(PoolingConnectionFactoryProvider.MAX_CREATE_CONNECTION_TIME, Duration.ofSeconds(10),
266266
"maxCreateConnectionTime"),
267267

268+
MAX_VALIDATION_TIME(PoolingConnectionFactoryProvider.MAX_VALIDATION_TIME, Duration.ofMinutes(4),
269+
"maxValidationTime"),
270+
271+
MIN_IDLE(PoolingConnectionFactoryProvider.MIN_IDLE, 5, "minIdle"),
272+
268273
POOL_NAME(PoolingConnectionFactoryProvider.POOL_NAME, "testPool", "name"),
269274

270275
POST_ALLOCATE(PoolingConnectionFactoryProvider.POST_ALLOCATE, mock(Function.class), "postAllocate"),

0 commit comments

Comments
 (0)