public void testJoinWithoutLeader() throws Throwable { runOnServer( () -> { JoinRequest request = JoinRequest.builder().withMember(members.get(0)).build(); JoinResponse response = state.join(request).get(); assertNoLeaderError(response); }); }
public void testLeaveWithoutLeader() throws Throwable { runOnServer( () -> { LeaveRequest request = LeaveRequest.builder().withMember(members.get(0)).build(); LeaveResponse response = state.leave(request).get(); assertNoLeaderError(response); }); }
public void testQueryWithoutLeader() throws Throwable { runOnServer( () -> { QueryRequest request = QueryRequest.builder().withSession(1).withQuery(new TestQuery()).build(); QueryResponse response = state.query(request).get(); assertNoLeaderError(response); }); }
public void testCommandWithoutLeader() throws Throwable { runOnServer( () -> { CommandRequest request = CommandRequest.builder().withSession(1).withCommand(new TestCommand("test")).build(); CommandResponse response = state.command(request).get(); assertNoLeaderError(response); }); }