sanpwc commented on code in PR #4215:
URL: https://github.com/apache/ignite-3/pull/4215#discussion_r1713218460


##########
modules/metastorage/src/integrationTest/java/org/apache/ignite/internal/metastorage/server/raft/ItMetaStorageRaftGroupTest.java:
##########
@@ -224,7 +224,6 @@ public void afterTest() {
      * @throws Exception If failed.
      */
     @Test
-    @Disabled("https://issues.apache.org/jira/browse/IGNITE-22891";)

Review Comment:
   Can you please explain, what was the reason for the test failure?



##########
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:
   Is it possible to drop both replicatorStartedCounter and 
replcicatorStoppedCounter entirely?
   Hope that it is possible to rewrite both onSubscribe and onNext in order to 
use terms instead of aforementioned counters.



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