You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ratis.apache.org by sh...@apache.org on 2020/04/27 05:23:02 UTC
[incubator-ratis] branch master updated: RATIS-879. Fix
TestRaftAsyncWithGrpc#testNoRetryWaitOnNotLeaderException (#61)
This is an automated email from the ASF dual-hosted git repository.
shashikant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ratis.git
The following commit(s) were added to refs/heads/master by this push:
new df24fb9 RATIS-879. Fix TestRaftAsyncWithGrpc#testNoRetryWaitOnNotLeaderException (#61)
df24fb9 is described below
commit df24fb937ffcb6448f434b92c100d2ed479fea83
Author: Lokesh Jain <lj...@apache.org>
AuthorDate: Mon Apr 27 10:52:55 2020 +0530
RATIS-879. Fix TestRaftAsyncWithGrpc#testNoRetryWaitOnNotLeaderException (#61)
---
ratis-server/src/test/java/org/apache/ratis/RaftAsyncTests.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/ratis-server/src/test/java/org/apache/ratis/RaftAsyncTests.java b/ratis-server/src/test/java/org/apache/ratis/RaftAsyncTests.java
index cd13c3c..6f44bfc 100644
--- a/ratis-server/src/test/java/org/apache/ratis/RaftAsyncTests.java
+++ b/ratis-server/src/test/java/org/apache/ratis/RaftAsyncTests.java
@@ -422,11 +422,8 @@ public abstract class RaftAsyncTests<CLUSTER extends MiniRaftCluster> extends Ba
FIVE_SECONDS.apply(f::get);
}
- final RetryPolicy r = event -> () -> {
- final IllegalStateException e = new IllegalStateException("Unexpected getSleepTime: " + event);
- setFirstException(e);
- throw e;
- };
+ // if sleep interval defined by retry policy is used the test will timeout
+ final RetryPolicy r = event -> () -> TimeDuration.valueOf(60, TimeUnit.SECONDS);
try (final RaftClient client = cluster.createClient(followers.get(0).getId(), cluster.getGroup(), r)) {
final CompletableFuture<RaftClientReply> f = client.sendAsync(new SimpleMessage("abc"));