[
https://issues.apache.org/jira/browse/ZOOKEEPER-4270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17310730#comment-17310730
]
Mohammad Arshad commented on ZOOKEEPER-4270:
--------------------------------------------
The test case is expecting node3 to be leader but node2 sometimes becomes
leader. This happens because leader election completes between node1 and node2
which is valid.
Fix: When node3 is leader keep the expectations same, otherwise change the
expectations
> Flaky test:
> org.apache.zookeeper.server.quorum.QuorumPeerMainTest#testLeaderOutOfView
> -------------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-4270
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4270
> Project: ZooKeeper
> Issue Type: Sub-task
> Components: tests
> Reporter: Mohammad Arshad
> Assignee: Mohammad Arshad
> Priority: Minor
> Fix For: 3.6.3, 3.8.0, 3.7.1
>
>
> org.apache.zookeeper.server.quorum.QuorumPeerMainTest#testLeaderOutOfView is
> flaky and often fails when I run it in local CI.
> Failure message:
> {noformat}
> java.lang.AssertionError
> at
> org.apache.zookeeper.server.quorum.QuorumPeerMainTest.testLeaderOutOfView(QuorumPeerMainTest.java:937)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)