7172737475767778
* @see DATAREDIS-330 */ @Test public void failoverShouldBeSentCorrectly() { connection.failover(new RedisNodeBuilder().withName("mymaster").build()); verify(jedisMock, times(1)).sentinelFailover(eq("mymaster")); }
88899091929394
/** * @see DATAREDIS-330 */ @Test(expected = IllegalArgumentException.class) public void failoverShouldThrowExceptionIfMasterNodeNameIsEmpty() { connection.failover(new RedisNodeBuilder().build()); }
117118119120121122123124
* @see DATAREDIS-330 */ @Test public void shouldReadSlavesCorrectlyWhenGivenNamedNode() { connection.slaves(new RedisNodeBuilder().withName("mymaster").build()); verify(jedisMock, times(1)).sentinelSlaves(eq("mymaster")); }
142143144145146147148
/** * @see DATAREDIS-330 */ @Test(expected = IllegalArgumentException.class) public void readSlavesShouldThrowExceptionWhenNodeWithoutName() { connection.slaves(new RedisNodeBuilder().build()); }
151152153154155156157158
* @see DATAREDIS-330 */ @Test public void shouldRemoveMasterCorrectlyWhenGivenNamedNode() { connection.remove(new RedisNodeBuilder().withName("mymaster").build()); verify(jedisMock, times(1)).sentinelRemove(eq("mymaster")); }
176177178179180181182
/** * @see DATAREDIS-330 */ @Test(expected = IllegalArgumentException.class) public void removeShouldThrowExceptionWhenNodeWithoutName() { connection.remove(new RedisNodeBuilder().build()); }