@Test public void testReset() { redisSentinel.reset( MASTER_NAME, reply -> { assertTrue(reply.succeeded()); testComplete(); }); await(); }
@Test public void testMasterAddrByName() { redisSentinel.getMasterAddrByName( MASTER_NAME, reply -> { assertTrue(reply.succeeded()); testComplete(); }); await(); }
@Test @Ignore // ignoring as test is flaky, sentinel does not discovery slave or is subjected to timing public void testCkquorum() { redisSentinel.failover( MASTER_NAME, reply -> { assertTrue(reply.succeeded()); assertEquals("OK", reply.result().toString()); testComplete(); }); await(); }
@Test @Ignore // embedded redis doesn't support flushConfig command public void testFlushConfig() { redisSentinel.flushConfig( reply -> { assertTrue(reply.succeeded()); if (reply.succeeded()) { reply.result(); testComplete(); } }); await(); }
@Test public void testMasters() { redisSentinel.masters( reply -> { assertTrue(reply.succeeded()); assertEquals(1, reply.result().size()); JsonObject result = JsonUtils.convertToJsonObject(reply.result().getJsonArray(0)); assertEquals(MASTER_NAME, result.getString("name")); assertEquals(host, result.getString("ip")); assertEquals(String.valueOf(DEFAULT_PORT), result.getString("port")); testComplete(); }); await(); }