Upgrade to R2DBC Bom Borca-SR2

Closes gh-32328
This commit is contained in:
Stephane Nicoll 2022-09-14 10:32:49 +02:00
parent 24ab4e88cd
commit d4a88041dc
4 changed files with 11 additions and 2 deletions

View File

@ -93,7 +93,7 @@ class R2dbcAutoConfigurationTests {
assertThat(context).hasSingleBean(ConnectionFactory.class).hasSingleBean(ConnectionPool.class)
.hasSingleBean(R2dbcProperties.class);
ConnectionPool connectionPool = context.getBean(ConnectionPool.class);
assertThat(connectionPool).hasFieldOrPropertyWithValue("maxAcquireTime", Duration.ofNanos(-1));
assertThat(connectionPool).hasFieldOrPropertyWithValue("maxAcquireTime", Duration.ofMillis(-1));
});
}

View File

@ -1407,7 +1407,7 @@ bom {
]
}
}
library("R2DBC Bom", "Borca-SR1") {
library("R2DBC Bom", "Borca-SR2") {
group("io.r2dbc") {
imports = [
"r2dbc-bom"

View File

@ -244,6 +244,10 @@ public final class ConnectionFactoryBuilder {
.to(builder::maxIdleTime);
map.from(options.getValue(PoolingConnectionFactoryProvider.MAX_CREATE_CONNECTION_TIME)).as(this::toDuration)
.to(builder::maxCreateConnectionTime);
map.from(options.getValue(PoolingConnectionFactoryProvider.MAX_VALIDATION_TIME)).as(this::toDuration)
.to(builder::maxValidationTime);
map.from(options.getValue(PoolingConnectionFactoryProvider.MIN_IDLE)).as(this::toInteger)
.to(builder::minIdle);
map.from(options.getValue(PoolingConnectionFactoryProvider.POOL_NAME)).as(this::toString).to(builder::name);
map.from(options.getValue(PoolingConnectionFactoryProvider.PRE_RELEASE)).to((function) -> builder
.preRelease((Function<? super Connection, ? extends Publisher<Void>>) function));

View File

@ -265,6 +265,11 @@ class ConnectionFactoryBuilderTests {
MAX_CREATE_CONNECTION_TIME(PoolingConnectionFactoryProvider.MAX_CREATE_CONNECTION_TIME, Duration.ofSeconds(10),
"maxCreateConnectionTime"),
MAX_VALIDATION_TIME(PoolingConnectionFactoryProvider.MAX_VALIDATION_TIME, Duration.ofMinutes(4),
"maxValidationTime"),
MIN_IDLE(PoolingConnectionFactoryProvider.MIN_IDLE, 5, "minIdle"),
POOL_NAME(PoolingConnectionFactoryProvider.POOL_NAME, "testPool", "name"),
POST_ALLOCATE(PoolingConnectionFactoryProvider.POST_ALLOCATE, mock(Function.class), "postAllocate"),