denis-chudov commented on code in PR #4215:
URL: https://github.com/apache/ignite-3/pull/4215#discussion_r1713269688
##########
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:
As I understand, replicatorStartedCounter is used for waiting for majority
in `onSubscribe`. Regarding replicatorStoppedCounter, seems it's not necessary
already
--
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]