This is an automated email from the ASF dual-hosted git repository.

vveider pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 02f14b478 IGNITE-17371 ItNodeTest.changePeersAsyncResponses test is 
flaky (#940)
02f14b478 is described below

commit 02f14b478d16a93681e5a1de31c6a173153a4f5f
Author: Roman Puchkovskiy <roman.puchkovs...@gmail.com>
AuthorDate: Thu Jul 14 14:44:52 2022 +0400

    IGNITE-17371 ItNodeTest.changePeersAsyncResponses test is flaky (#940)
---
 .../java/org/apache/ignite/raft/jraft/core/ItNodeTest.java     | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
 
b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
index 2a2383be4..d51c2965c 100644
--- 
a/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
+++ 
b/modules/raft/src/integrationTest/java/org/apache/ignite/raft/jraft/core/ItNodeTest.java
@@ -21,6 +21,8 @@ import static java.util.Collections.synchronizedList;
 import static java.util.stream.Collectors.toList;
 import static 
org.apache.ignite.raft.jraft.core.TestCluster.ELECTION_TIMEOUT_MILLIS;
 import static org.apache.ignite.raft.jraft.test.TestUtils.sender;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsInAnyOrder;
 import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -3242,8 +3244,12 @@ public class ItNodeTest {
         futs.get(0).get();
         futs.get(1).get();
 
-        assertEquals(dones.get(0).await(), Status.OK());
-        assertEquals(dones.get(1).await().getRaftError(), RaftError.EBUSY);
+        Status firstDoneStatus = dones.get(0).await();
+        Status secondDoneStatus = dones.get(1).await();
+        assertThat(
+                List.of(firstDoneStatus.getRaftError(), 
secondDoneStatus.getRaftError()),
+                containsInAnyOrder(RaftError.SUCCESS, RaftError.EBUSY)
+        );
 
         assertTrue(waitForCondition(() -> {
             if (cluster.getLeader() != null)

Reply via email to