softgitron commented on a change in pull request #466:
URL: https://github.com/apache/ratis/pull/466#discussion_r619607943



##########
File path: 
ratis-server/src/test/java/org/apache/ratis/InstallSnapshotNotificationTests.java
##########
@@ -332,6 +337,11 @@ private void testInstallSnapshotNotificationCount(CLUSTER 
cluster) throws Except
 
       // Make sure leader and followers are still up to date.
       for (RaftServer.Division follower : cluster.getFollowers()) {
+        long leaderIndex = leader.getRaftLog().getNextIndex();
+        // Give follower slightly time to catch up
+        RaftTestUtil.waitFor(
+                () -> leaderIndex == follower.getRaftLog().getNextIndex(),
+                300, 15000);
         Assert.assertEquals(
             leader.getRaftLog().getNextIndex(),
             follower.getRaftLog().getNextIndex());

Review comment:
       Yes, I tought about that too, but I wanted to make absolutely certain 
that functionality of testcase is not changed accidentally. However, if you 
agree with my inner thoughts, then it is fine to remove. Fixed in the last 
commit.




-- 
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.

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


Reply via email to