kaijchen commented on code in PR #841:
URL: https://github.com/apache/ratis/pull/841#discussion_r1125197606


##########
ratis-test/src/test/java/org/apache/ratis/grpc/TestLogAppenderWithGrpc.java:
##########
@@ -80,6 +80,12 @@ public void testPendingLimits() throws IOException, 
InterruptedException {
       final RaftServer.Division leader = waitForLeader(cluster);
       long initialNextIndex = RaftServerTestUtil.getNextIndex(leader);
 
+      JavaUtils.attempt(() -> {
+        // Make sure followers are up-to-date before blocking the appends in 
the follower
+        
cluster.getFollowers().stream().mapToLong(RaftServerTestUtil::getNextIndex)
+            .forEach(nextIndex -> Assert.assertEquals(initialNextIndex, 
nextIndex));
+      }, 5, ONE_SECOND, "matching initial nextIndex", LOG);

Review Comment:
   I found it's better to use `client.io().watch()` here, see latest commits.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to