denis-chudov commented on code in PR #4215:
URL: https://github.com/apache/ignite-3/pull/4215#discussion_r1713396836


##########
modules/metastorage/src/integrationTest/java/org/apache/ignite/internal/metastorage/server/raft/ItMetaStorageRaftGroupTest.java:
##########
@@ -316,22 +326,24 @@ public void onNext(Entry item) {
                                         .stopAsync(componentContext);
                                 assertThat(stopFuture, 
willCompleteSuccessfully());
 
-                                
raftGroupServiceOfLiveServer.refreshLeader().get();
+                                CompletableFuture<LeaderWithTerm> 
newLeaderWithTermFut = raftGroupServiceOfLiveServer
+                                        .refreshAndGetLeaderWithTerm();
+                                assertThat(newLeaderWithTermFut, 
willCompleteSuccessfully());
+                                LeaderWithTerm newLeaderWithTerm = 
newLeaderWithTermFut.join();
 
-                                assertNotSame(oldLeaderId, 
raftGroupServiceOfLiveServer.leader().consistentId());
+                                assertNotSame(oldLeaderId, 
newLeaderWithTerm.leader().consistentId());
 
-                                // ensure that leader has been changed only 
once
-                                assertTrue(
-                                        waitForCondition(() -> 
replicatorStartedCounter.get() == 4, 5_000),

Review Comment:
   I agree.
   Tried 500 repetitions with removed counters: 
   
https://ci.ignite.apache.org/buildConfiguration/ApacheIgnite3xGradle_Test_IntegrationTests_ModuleMetastorageClient/8389221?hideTestsFromDependencies=false&hideProblemsFromDependencies=false&expandBuildDeploymentsSection=false&expandBuildChangesSection=true



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