R2dbcAutoConfigurationTests.java (spring-boot-2.7.3) | : | R2dbcAutoConfigurationTests.java (spring-boot-2.7.4) | ||
---|---|---|---|---|
skipping to change at line 96 | skipping to change at line 96 | |||
}); | }); | |||
} | } | |||
@Test | @Test | |||
void configureWithUrlAndDefaultDoNotOverrideDefaultTimeouts() { | void configureWithUrlAndDefaultDoNotOverrideDefaultTimeouts() { | |||
this.contextRunner.withPropertyValues("spring.r2dbc.url:r2dbc:h2: mem:///" + randomDatabaseName()) | this.contextRunner.withPropertyValues("spring.r2dbc.url:r2dbc:h2: mem:///" + randomDatabaseName()) | |||
.run((context) -> { | .run((context) -> { | |||
assertThat(context).hasSingleBean(Connect ionFactory.class).hasSingleBean(ConnectionPool.class) | assertThat(context).hasSingleBean(Connect ionFactory.class).hasSingleBean(ConnectionPool.class) | |||
.hasSingleBean(R2dbcPrope rties.class); | .hasSingleBean(R2dbcPrope rties.class); | |||
ConnectionPool connectionPool = context.g etBean(ConnectionPool.class); | ConnectionPool connectionPool = context.g etBean(ConnectionPool.class); | |||
assertThat(connectionPool).hasFieldOrProp ertyWithValue("maxAcquireTime", Duration.ofNanos(-1)); | assertThat(connectionPool).hasFieldOrProp ertyWithValue("maxAcquireTime", Duration.ofMillis(-1)); | |||
}); | }); | |||
} | } | |||
@Test | @Test | |||
void configureWithUrlPoolAndPoolPropertiesFails() { | void configureWithUrlPoolAndPoolPropertiesFails() { | |||
this.contextRunner | this.contextRunner | |||
.withPropertyValues("spring.r2dbc.url:r2dbc:pool: h2:mem:///" + randomDatabaseName() + "?maxSize=12", | .withPropertyValues("spring.r2dbc.url:r2dbc:pool: h2:mem:///" + randomDatabaseName() + "?maxSize=12", | |||
"spring.r2dbc.pool.max-size=15") | "spring.r2dbc.pool.max-size=15") | |||
.run((context) -> assertThat(context).getFailure( ).getRootCause() | .run((context) -> assertThat(context).getFailure( ).getRootCause() | |||
.isInstanceOf(MultipleConnectionP oolConfigurationsException.class)); | .isInstanceOf(MultipleConnectionP oolConfigurationsException.class)); | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |