[ https://issues.apache.org/jira/browse/ZOOKEEPER-2953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16293562#comment-16293562 ]
Hudson commented on ZOOKEEPER-2953: ----------------------------------- SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #3661 (See [https://builds.apache.org/job/ZooKeeper-trunk/3661/]) ZOOKEEPER-2953: Flaky Test: testNoLogBeforeLeaderEstablishment (phunt: rev f2cbcc7e0d7adff08bd73a27f2193b1198e4c7f7) * (edit) src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerTestBase.java * (edit) src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java * (edit) src/java/test/org/apache/zookeeper/test/QuorumTest.java > Flaky Test: testNoLogBeforeLeaderEstablishment > ---------------------------------------------- > > Key: ZOOKEEPER-2953 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2953 > Project: ZooKeeper > Issue Type: Bug > Affects Versions: 3.5.3, 3.4.11, 3.6.0 > Reporter: Abraham Fine > Assignee: Abraham Fine > Fix For: 3.5.4, 3.6.0, 3.4.12 > > > testNoLogBeforeLeaderEstablishment has been flaky on 3.4, 3.5, and master for > quite awhile. My understanding is that the purpose of the test is to make > sure that a server receives support from the quorum before changing the epoch > and acting as leader. > There are a couple issues with the test in its current state. First, the > assertions the test makes are not always true. It is possible, if the > zookeeper database is not cleared, for a follower to be ahead of a leader > when the quorum is shutdown. That follower will then likely become leader > when the quorum is restarted. This is the cause of the flaky behavior. > Second, the test does not appear to create the conditions it wants to test > for. Since, ZOOKEEPER-335 (specifically the ZOOKEEPER-1081 subtask) we take > the epoch into consideration in {{FastLeaderElection}} so the test no longer > "believes it is the leader once it recovers". > After discussing the issue offline with [~phunt] we decided it would still be > valuable to test the situation where a server is elected leader without the > support of the quorum. So I removed {{testNoLogBeforeLeaderEstablishment}} > and created a new test called {{testElectionFraud}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029)