You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "szetszwo (via GitHub)" <gi...@apache.org> on 2023/03/01 20:32:29 UTC
[GitHub] [ratis] szetszwo commented on a diff in pull request #837: [RATIS-1801] Fix flasky test of TestLogAppenderWithGrpc.testPendingLimits
szetszwo commented on code in PR #837:
URL: https://github.com/apache/ratis/pull/837#discussion_r1122269762
##########
ratis-test/src/test/java/org/apache/ratis/grpc/TestLogAppenderWithGrpc.java:
##########
@@ -89,7 +89,7 @@ public void testPendingLimits() throws IOException, InterruptedException {
futures.add(client.async().send(new RaftTestUtil.SimpleMessage("m")));
}
- FIVE_SECONDS.sleep();
+ TEN_SECONDS.sleep();
Review Comment:
@AngersZhuuuu , thanks a lot for fixing this. Let's use `JavaUtils.attempt` to retry.
```java
JavaUtils.attempt(() -> {
for (long nextIndex : leader.getInfo().getFollowerNextIndices()) {
// Verify nextIndex does not progress due to pendingRequests limit
Assert.assertEquals(initialNextIndex + maxAppends, nextIndex);
}
}, 5, ONE_SECOND, "matching nextIndex", LOG);
```
--
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: issues-unsubscribe@ratis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org