Upgrade to Lettuce 5.1.0.M1
Closes gh-13181
This commit is contained in:
@@ -28,6 +28,7 @@ import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.RedisClusterConfiguration;
|
||||
import org.springframework.data.redis.connection.RedisNode;
|
||||
import org.springframework.data.redis.connection.lettuce.LettuceClientConfiguration.LettuceClientConfigurationBuilder;
|
||||
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||
@@ -231,9 +232,17 @@ public class RedisAutoConfigurationTests {
|
||||
.withPropertyValues(
|
||||
"spring.redis.cluster.nodes[0]:" + clusterNodes.get(0),
|
||||
"spring.redis.cluster.nodes[1]:" + clusterNodes.get(1))
|
||||
.run((context) -> assertThat(context
|
||||
.getBean(LettuceConnectionFactory.class).getClusterConnection())
|
||||
.isNotNull());
|
||||
.run((context) -> {
|
||||
RedisClusterConfiguration clusterConfiguration = context
|
||||
.getBean(LettuceConnectionFactory.class)
|
||||
.getClusterConfiguration();
|
||||
assertThat(clusterConfiguration.getClusterNodes()).hasSize(2);
|
||||
assertThat(clusterConfiguration.getClusterNodes())
|
||||
.extracting((node) -> node.getHost() + ":" + node.getPort())
|
||||
.containsExactlyInAnyOrder("127.0.0.1:27379",
|
||||
"127.0.0.1:27380");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user