Beispiel #1
0
 public void testJoinWithoutLeader() throws Throwable {
   runOnServer(
       () -> {
         JoinRequest request = JoinRequest.builder().withMember(members.get(0)).build();
         JoinResponse response = state.join(request).get();
         assertNoLeaderError(response);
       });
 }
Beispiel #2
0
 public void testLeaveWithoutLeader() throws Throwable {
   runOnServer(
       () -> {
         LeaveRequest request = LeaveRequest.builder().withMember(members.get(0)).build();
         LeaveResponse response = state.leave(request).get();
         assertNoLeaderError(response);
       });
 }
Beispiel #3
0
 public void testQueryWithoutLeader() throws Throwable {
   runOnServer(
       () -> {
         QueryRequest request =
             QueryRequest.builder().withSession(1).withQuery(new TestQuery()).build();
         QueryResponse response = state.query(request).get();
         assertNoLeaderError(response);
       });
 }
Beispiel #4
0
 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);
       });
 }