Github user anmolnar commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/453#discussion_r167838605
--- Diff:
src/java/test/org/apache/zookeeper/server/quorum/LearnerHandlerTest.java ---
@@ -498,31 +507,20 @@ public void testNewEpochZxidWithTxnlogOnly() throws
Exception {
// Peer has zxid of epoch 3
peerZxid = getZxid(3, 0);
- assertFalse(learnerHandler.syncFollower(peerZxid, db, leader));
- // We send DIFF to (6,0) and forward any packet starting at (4,1)
- assertOpType(Leader.DIFF, getZxid(6, 0), getZxid(4, 1));
- // DIFF + 1 proposals + 1 commit
- assertEquals(3, learnerHandler.getQueuedPackets().size());
- queuedPacketMatches(new long[] { getZxid(4, 1)});
+ //There is no 3, 0 proposal in the committed log so sync
+ assertTrue(learnerHandler.syncFollower(peerZxid, db, leader));
--- End diff --
It seems to me that this test checking the same thing 3 times in a row.
Do you think it's necessary to do so?
---