Upgrade to Commons Pool2 2.11.0

Closes gh-27642
pull/27659/head
Andy Wilkinson 3 years ago
parent 45a7f3e182
commit fe17be16e9

@ -109,7 +109,7 @@ class JedisConnectionConfiguration extends RedisConnectionConfiguration {
config.setTimeBetweenEvictionRuns(pool.getTimeBetweenEvictionRuns());
}
if (pool.getMaxWait() != null) {
config.setMaxWaitMillis(pool.getMaxWait().toMillis());
config.setMaxWait(pool.getMaxWait());
}
return config;
}

@ -183,7 +183,7 @@ class LettuceConnectionConfiguration extends RedisConnectionConfiguration {
config.setTimeBetweenEvictionRuns(properties.getTimeBetweenEvictionRuns());
}
if (properties.getMaxWait() != null) {
config.setMaxWaitMillis(properties.getMaxWait().toMillis());
config.setMaxWait(properties.getMaxWait());
}
return config;
}

@ -140,8 +140,8 @@ class RedisAutoConfigurationJedisTests {
assertThat(cf.getPoolConfig().getMinIdle()).isEqualTo(1);
assertThat(cf.getPoolConfig().getMaxIdle()).isEqualTo(4);
assertThat(cf.getPoolConfig().getMaxTotal()).isEqualTo(16);
assertThat(cf.getPoolConfig().getMaxWaitMillis()).isEqualTo(2000);
assertThat(cf.getPoolConfig().getTimeBetweenEvictionRuns()).isEqualTo(Duration.ofSeconds(30));
assertThat(cf.getPoolConfig().getMaxWaitDuration()).isEqualTo(Duration.ofSeconds(2));
assertThat(cf.getPoolConfig().getDurationBetweenEvictionRuns()).isEqualTo(Duration.ofSeconds(30));
});
}

@ -180,7 +180,7 @@ class RedisAutoConfigurationTests {
assertThat(poolConfig.getMinIdle()).isEqualTo(defaultPool.getMinIdle());
assertThat(poolConfig.getMaxIdle()).isEqualTo(defaultPool.getMaxIdle());
assertThat(poolConfig.getMaxTotal()).isEqualTo(defaultPool.getMaxActive());
assertThat(poolConfig.getMaxWaitMillis()).isEqualTo(defaultPool.getMaxWait().toMillis());
assertThat(poolConfig.getMaxWaitDuration()).isEqualTo(defaultPool.getMaxWait());
});
}
@ -196,8 +196,8 @@ class RedisAutoConfigurationTests {
assertThat(poolConfig.getMinIdle()).isEqualTo(1);
assertThat(poolConfig.getMaxIdle()).isEqualTo(4);
assertThat(poolConfig.getMaxTotal()).isEqualTo(16);
assertThat(poolConfig.getMaxWaitMillis()).isEqualTo(2000);
assertThat(poolConfig.getTimeBetweenEvictionRuns()).isEqualTo(Duration.ofSeconds(30));
assertThat(poolConfig.getMaxWaitDuration()).isEqualTo(Duration.ofSeconds(2));
assertThat(poolConfig.getDurationBetweenEvictionRuns()).isEqualTo(Duration.ofSeconds(30));
assertThat(cf.getShutdownTimeout()).isEqualTo(1000);
});
}

@ -211,7 +211,7 @@ bom {
]
}
}
library("Commons Pool2", "2.10.0") {
library("Commons Pool2", "2.11.0") {
group("org.apache.commons") {
modules = [
"commons-pool2"

Loading…
Cancel
Save