Polish "Prevent redis pool to initialize in unit test"
See gh-43774
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -159,11 +159,13 @@ class RedisAutoConfigurationJedisTests {
|
||||
.run((context) -> {
|
||||
JedisConnectionFactory cf = context.getBean(JedisConnectionFactory.class);
|
||||
assertThat(cf.getHostName()).isEqualTo("foo");
|
||||
assertThat(cf.getPoolConfig().getMinIdle()).isZero();
|
||||
assertThat(cf.getPoolConfig().getMaxIdle()).isEqualTo(4);
|
||||
assertThat(cf.getPoolConfig().getMaxTotal()).isEqualTo(16);
|
||||
assertThat(cf.getPoolConfig().getMaxWaitDuration()).isEqualTo(Duration.ofSeconds(2));
|
||||
assertThat(cf.getPoolConfig().getDurationBetweenEvictionRuns()).isEqualTo(Duration.ofSeconds(30));
|
||||
assertThat(cf.getPoolConfig()).satisfies((poolConfig) -> {
|
||||
assertThat(poolConfig.getMinIdle()).isEqualTo(0);
|
||||
assertThat(poolConfig.getMaxIdle()).isEqualTo(4);
|
||||
assertThat(poolConfig.getMaxTotal()).isEqualTo(16);
|
||||
assertThat(poolConfig.getMaxWaitDuration()).isEqualTo(Duration.ofSeconds(2));
|
||||
assertThat(poolConfig.getDurationBetweenEvictionRuns()).isEqualTo(Duration.ofSeconds(30));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user