amarkevich commented on code in PR #4545:
URL: https://github.com/apache/activemq-artemis/pull/4545#discussion_r1260344368
##########
artemis-quorum-ri/src/test/java/org/apache/activemq/artemis/quorum/zookeeper/CuratorDistributedLockTest.java:
##########
@@ -337,21 +333,8 @@ public void
beNotifiedOfAlreadyUnavailableManagerAfterAddingListener() throws Ex
}
}
- private boolean ensembleHasLeader() {
- return
testingServer.getServers().stream().filter(CuratorDistributedLockTest::isLeader).count()
!= 0;
- }
-
- private static boolean isLeader(TestingZooKeeperServer server) {
- if (server.getInstanceSpecs().size() == 1) {
- return true;
- }
- long leaderId = server.getQuorumPeer().getLeaderId();
- long id = server.getQuorumPeer().getId();
- return id == leaderId;
- }
-
private void stopMajorityNotLeaderNodes(boolean fromLast) throws Exception {
- List<TestingZooKeeperServer> followers =
testingServer.getServers().stream().filter(Predicates.not(CuratorDistributedLockTest::isLeader)).collect(Collectors.toList());
+ List<TestingZooKeeperServer> followers = testingServer.getServers();
Review Comment:
renamed
--
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]