Upgrade to Commons Pool2 2.10.0
Closes gh-27256
This commit is contained in:
@@ -106,7 +106,7 @@ class JedisConnectionConfiguration extends RedisConnectionConfiguration {
|
||||
config.setMaxIdle(pool.getMaxIdle());
|
||||
config.setMinIdle(pool.getMinIdle());
|
||||
if (pool.getTimeBetweenEvictionRuns() != null) {
|
||||
config.setTimeBetweenEvictionRunsMillis(pool.getTimeBetweenEvictionRuns().toMillis());
|
||||
config.setTimeBetweenEvictionRuns(pool.getTimeBetweenEvictionRuns());
|
||||
}
|
||||
if (pool.getMaxWait() != null) {
|
||||
config.setMaxWaitMillis(pool.getMaxWait().toMillis());
|
||||
|
||||
@@ -180,7 +180,7 @@ class LettuceConnectionConfiguration extends RedisConnectionConfiguration {
|
||||
config.setMaxIdle(properties.getMaxIdle());
|
||||
config.setMinIdle(properties.getMinIdle());
|
||||
if (properties.getTimeBetweenEvictionRuns() != null) {
|
||||
config.setTimeBetweenEvictionRunsMillis(properties.getTimeBetweenEvictionRuns().toMillis());
|
||||
config.setTimeBetweenEvictionRuns(properties.getTimeBetweenEvictionRuns());
|
||||
}
|
||||
if (properties.getMaxWait() != null) {
|
||||
config.setMaxWaitMillis(properties.getMaxWait().toMillis());
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
@@ -139,7 +141,7 @@ class RedisAutoConfigurationJedisTests {
|
||||
assertThat(cf.getPoolConfig().getMaxIdle()).isEqualTo(4);
|
||||
assertThat(cf.getPoolConfig().getMaxTotal()).isEqualTo(16);
|
||||
assertThat(cf.getPoolConfig().getMaxWaitMillis()).isEqualTo(2000);
|
||||
assertThat(cf.getPoolConfig().getTimeBetweenEvictionRunsMillis()).isEqualTo(30000);
|
||||
assertThat(cf.getPoolConfig().getTimeBetweenEvictionRuns()).isEqualTo(Duration.ofSeconds(30));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.boot.autoconfigure.data.redis;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
@@ -196,7 +197,7 @@ class RedisAutoConfigurationTests {
|
||||
assertThat(poolConfig.getMaxIdle()).isEqualTo(4);
|
||||
assertThat(poolConfig.getMaxTotal()).isEqualTo(16);
|
||||
assertThat(poolConfig.getMaxWaitMillis()).isEqualTo(2000);
|
||||
assertThat(poolConfig.getTimeBetweenEvictionRunsMillis()).isEqualTo(30000);
|
||||
assertThat(poolConfig.getTimeBetweenEvictionRuns()).isEqualTo(Duration.ofSeconds(30));
|
||||
assertThat(cf.getShutdownTimeout()).isEqualTo(1000);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ bom {
|
||||
]
|
||||
}
|
||||
}
|
||||
library("Commons Pool2", "2.9.0") {
|
||||
library("Commons Pool2", "2.10.0") {
|
||||
group("org.apache.commons") {
|
||||
modules = [
|
||||
"commons-pool2"
|
||||
|
||||
Reference in New Issue
Block a user