Upgrade to R2DBC 1.0

With the 1.0 release of the SPI, R2DBC's bom is no longer published.
This commit updates Spring Boot's dependency management to no longer
use the bom. Tests have also been updated to adapt to slight changes
in R2DBC's configuration options and their default values.

Closes gh-31702
This commit is contained in:
Andy Wilkinson
2022-07-13 12:09:02 +01:00
parent 4bd3534b7d
commit 88ee31c422
3 changed files with 41 additions and 4 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

@@ -1122,6 +1122,13 @@ bom {
]
}
}
library("Oracle R2DBC", "1.0.0") {
group("com.oracle.database.r2dbc") {
modules = [
"oracle-r2dbc"
]
}
}
library("Pooled JMS", "3.0.0") {
group("org.messaginghub") {
modules = [
@@ -1161,10 +1168,38 @@ bom {
]
}
}
library("R2DBC Bom", "Borca-SR1") {
library("R2DBC H2", "1.0.0.RC1") {
group("io.r2dbc") {
imports = [
"r2dbc-bom"
modules = [
"r2dbc-h2"
]
}
}
library("R2DBC Pool", "1.0.0.RC1") {
group("io.r2dbc") {
modules = [
"r2dbc-pool"
]
}
}
library("R2DBC Postgresql", "1.0.0.RC1") {
group("org.postgresql") {
modules = [
"r2dbc-postgresql"
]
}
}
library("R2DBC Proxy", "1.0.0.RELEASE") {
group("io.r2dbc") {
modules = [
"r2dbc-proxy"
]
}
}
library("R2DBC SPI", "1.0.0.RELEASE") {
group("io.r2dbc") {
modules = [
"r2dbc-spi"
]
}
}

View File

@@ -265,6 +265,8 @@ class ConnectionFactoryBuilderTests {
MAX_CREATE_CONNECTION_TIME(PoolingConnectionFactoryProvider.MAX_CREATE_CONNECTION_TIME, Duration.ofSeconds(10),
"maxCreateConnectionTime"),
MIN_IDLE(PoolingConnectionFactoryProvider.MIN_IDLE, 0, "minIdle"),
POOL_NAME(PoolingConnectionFactoryProvider.POOL_NAME, "testPool", "name"),
POST_ALLOCATE(PoolingConnectionFactoryProvider.POST_ALLOCATE, mock(Function.class), "postAllocate"),