Skip to content

Commit 8187515

Browse files
committed
Use only SENTINEL REPLICAS in tests
Related to and downmerge of: Deprecate SENTINEL SLAVES and change tests (#2673)
1 parent a420462 commit 8187515

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

src/test/java/redis/clients/jedis/tests/JedisSentinelTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void sentinel() {
6565
Integer.parseInt(masterHostAndPort.get(1)));
6666
assertEquals(master, masterFromSentinel);
6767

68-
List<Map<String, String>> slaves = j.sentinelSlaves(MASTER_NAME);
68+
List<Map<String, String>> slaves = j.sentinelReplicas(MASTER_NAME);
6969
assertTrue(!slaves.isEmpty());
7070
assertEquals(master.getPort(), Integer.parseInt(slaves.get(0).get("master-port")));
7171

src/test/java/redis/clients/jedis/tests/commands/SentinelCommandsTest.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,10 @@ public void masterMasters() {
4949
}
5050

5151
@Test
52-
public void replicasSlaves() {
53-
String runId;
52+
public void replicas() {
5453
try (Jedis sentinel = new Jedis(sentinel2_1)) {
5554
Map<String, String> details = sentinel.sentinelReplicas("mymaster").get(0);
5655
assertEquals(Integer.toString(replica2.getPort()), details.get("port"));
57-
runId = details.get("runid");
58-
}
59-
60-
try (Jedis sentinel2 = new Jedis(sentinel2_2)) {
61-
Map<String, String> details = sentinel2.sentinelSlaves("mymaster").get(0);
62-
assertEquals(runId, details.get("runid"));
6356
}
6457
}
6558
}

0 commit comments

Comments
 (0)