Skip to content

Commit

Permalink
RATIS-212. Fix typo in RaftAsyncTests
Browse files Browse the repository at this point in the history
  • Loading branch information
ongdisheng committed Dec 22, 2024
1 parent 318c897 commit 1332609
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,18 @@ public void testStaleReadAsync() throws Exception {
}

void runTestStaleReadAsync(CLUSTER cluster) throws Exception {
final int numMesssages = 10;
final int numMessages = 10;
try (RaftClient client = cluster.createClient()) {
RaftTestUtil.waitForLeader(cluster);

// submit some messages
final List<CompletableFuture<RaftClientReply>> futures = new ArrayList<>();
for (int i = 0; i < numMesssages; i++) {
for (int i = 0; i < numMessages; i++) {
final String s = "" + i;
LOG.info("sendAsync " + s);
futures.add(client.async().send(new SimpleMessage(s)));
}
Assert.assertEquals(numMesssages, futures.size());
Assert.assertEquals(numMessages, futures.size());
final List<RaftClientReply> replies = new ArrayList<>();
for (CompletableFuture<RaftClientReply> f : futures) {
final RaftClientReply r = f.join();
Expand Down Expand Up @@ -322,7 +322,7 @@ void runTestStaleReadAsync(CLUSTER cluster) throws Exception {
StateMachineException.class, IndexOutOfBoundsException.class);

// test sendStaleReadAsync
for (int i = 0; i < numMesssages; i++) {
for (int i = 0; i < numMessages; i++) {
final RaftClientReply reply = replies.get(i);
final String query = "" + i;
LOG.info("query=" + query + ", reply=" + reply);
Expand Down

0 comments on commit 1332609

Please sign in to comment.