Commit acacf69 1 parent df05370 commit acacf69 Copy full SHA for acacf69
File tree 2 files changed +18
-0
lines changed
main/java/redis/clients/jedis
test/java/redis/clients/jedis/tests
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -157,4 +157,9 @@ public void close() {
157
157
clear ();
158
158
}
159
159
160
+ public Response <Long > waitReplicas (int replicas , long timeout ) {
161
+ client .waitReplicas (replicas , timeout );
162
+ return getResponse (BuilderFactory .LONG );
163
+ }
164
+
160
165
}
Original file line number Diff line number Diff line change @@ -409,6 +409,19 @@ public void testDiscardInPipeline() {
409
409
get .get ();
410
410
}
411
411
412
+ @ Test
413
+ public void waitReplicas () {
414
+ Pipeline p = jedis .pipelined ();
415
+ p .set ("wait" , "replicas" );
416
+ p .waitReplicas (1 , 10 );
417
+ p .sync ();
418
+
419
+ try (Jedis j = new Jedis (HostAndPortUtil .getRedisServers ().get (4 ))) {
420
+ j .auth ("foobared" );
421
+ assertEquals ("replicas" , j .get ("wait" ));
422
+ }
423
+ }
424
+
412
425
@ Test
413
426
public void testEval () {
414
427
String script = "return 'success!'" ;
You can’t perform that action at this time.
0 commit comments