From db9b7ca447df3b19e1a764e9b691e515f14f46c7 Mon Sep 17 00:00:00 2001 From: Jon Chambers Date: Tue, 21 Jul 2020 18:11:02 -0400 Subject: [PATCH] Fix slot assignment when building a cluster for tests. --- .../textsecuregcm/redis/AbstractRedisClusterTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/redis/AbstractRedisClusterTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/redis/AbstractRedisClusterTest.java index f32903596..d3afb4371 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/redis/AbstractRedisClusterTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/redis/AbstractRedisClusterTest.java @@ -113,7 +113,7 @@ public abstract class AbstractRedisClusterTest { final int startInclusive = i * slotsPerNode; final int endExclusive = i == nodes.length - 1 ? MAX_SLOT : (i + 1) * slotsPerNode; - final RedisClient assignSlotClient = RedisClient.create(RedisURI.create("127.0.0.1", nodes[0].ports().get(0))); + final RedisClient assignSlotClient = RedisClient.create(RedisURI.create("127.0.0.1", nodes[i].ports().get(0))); try { final int[] slots = new int[endExclusive - startInclusive];