From 81875156be52c4b5d8f723f6b75cb778f10e2219 Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Sun, 12 Dec 2021 13:48:55 +0600 Subject: [PATCH] Use only SENTINEL REPLICAS in tests Related to and downmerge of: Deprecate SENTINEL SLAVES and change tests (#2673) --- .../redis/clients/jedis/tests/JedisSentinelTest.java | 2 +- .../jedis/tests/commands/SentinelCommandsTest.java | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java b/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java index 1f258819a8..951f0d34a9 100644 --- a/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java +++ b/src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java @@ -65,7 +65,7 @@ public void sentinel() { Integer.parseInt(masterHostAndPort.get(1))); assertEquals(master, masterFromSentinel); - List> slaves = j.sentinelSlaves(MASTER_NAME); + List> slaves = j.sentinelReplicas(MASTER_NAME); assertTrue(!slaves.isEmpty()); assertEquals(master.getPort(), Integer.parseInt(slaves.get(0).get("master-port"))); diff --git a/src/test/java/redis/clients/jedis/tests/commands/SentinelCommandsTest.java b/src/test/java/redis/clients/jedis/tests/commands/SentinelCommandsTest.java index 3af543a6df..66111a62cb 100644 --- a/src/test/java/redis/clients/jedis/tests/commands/SentinelCommandsTest.java +++ b/src/test/java/redis/clients/jedis/tests/commands/SentinelCommandsTest.java @@ -49,17 +49,10 @@ public void masterMasters() { } @Test - public void replicasSlaves() { - String runId; + public void replicas() { try (Jedis sentinel = new Jedis(sentinel2_1)) { Map details = sentinel.sentinelReplicas("mymaster").get(0); assertEquals(Integer.toString(replica2.getPort()), details.get("port")); - runId = details.get("runid"); - } - - try (Jedis sentinel2 = new Jedis(sentinel2_2)) { - Map details = sentinel2.sentinelSlaves("mymaster").get(0); - assertEquals(runId, details.get("runid")); } } }