From 97ae2b5d9e5079792a97bb90dbbf995518eade8f Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 15 Aug 2023 14:28:04 +0200 Subject: [PATCH] Adopt to changed Redis 7.2 CLUSTER SHARDS response #2481 Redis 7.2 no longer reports the self shard. --- .../io/lettuce/core/cluster/ClusterCommandIntegrationTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/io/lettuce/core/cluster/ClusterCommandIntegrationTests.java b/src/test/java/io/lettuce/core/cluster/ClusterCommandIntegrationTests.java index 9a223ebb21..8863b3a185 100644 --- a/src/test/java/io/lettuce/core/cluster/ClusterCommandIntegrationTests.java +++ b/src/test/java/io/lettuce/core/cluster/ClusterCommandIntegrationTests.java @@ -124,7 +124,7 @@ void testClusterShardsParsing() { Partitions partitions = ClusterPartitionParser.parse(result); - assertThat(partitions).hasSize(4); + assertThat(partitions).hasSizeGreaterThan(2); // Redis 7.2 doesn't include the self-partition anymore assertThat(partitions.getPartitionBySlot(1).getUri().getPort()).isIn(7379, 7381); assertThat(partitions.getPartitionBySlot(12001).getUri().getPort()).isIn(7380, 7382); assertThat(partitions.getPartition("127.0.0.1", 7382).is(RedisClusterNode.NodeFlag.REPLICA)).isTrue();