Skip to content

Commit

Permalink
[Java] Test simplification.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjpt777 committed Jan 20, 2025
1 parent 21fd776 commit c584db8
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@ void shouldHandleMultipleElections()

final TestNode leader0 = cluster.awaitLeader();

final int numMessages = 3;
final int messageCount = 3;
cluster.connectClient();
cluster.sendMessages(numMessages);
cluster.awaitResponseMessageCount(numMessages);
cluster.awaitServicesMessageCount(numMessages);
cluster.sendAndAwaitMessages(messageCount, messageCount);

cluster.stopNode(leader0);
final TestNode leader1 = cluster.awaitLeader(leader0.index());
Expand All @@ -94,18 +92,14 @@ void shouldHandleMultipleElections()
awaitElectionClosed(cluster.node(leader0.index()));

cluster.connectClient();
cluster.sendMessages(numMessages);
cluster.awaitResponseMessageCount(numMessages * 2);
cluster.awaitServicesMessageCount(numMessages * 2);
cluster.sendAndAwaitMessages(messageCount, messageCount * 2);

cluster.stopNode(leader1);
cluster.awaitLeader(leader1.index());
cluster.startStaticNode(leader1.index(), false);
awaitElectionClosed(cluster.node(leader1.index()));

cluster.connectClient();
cluster.sendMessages(numMessages);
cluster.awaitResponseMessageCount(numMessages * 3);
cluster.awaitServicesMessageCount(numMessages * 3);
cluster.sendAndAwaitMessages(messageCount, messageCount * 2);
}
}

0 comments on commit c584db8

Please sign in to comment.