[ https://issues.apache.org/jira/browse/RATIS-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16248430#comment-16248430 ]
Lokesh Jain commented on RATIS-137: ----------------------------------- Thanks for the review [~szetszwo]. v3 patch addresses your comments. I had run the TestRaftWith\* multiple times earlier but it hadn't failed. The only possible reason of failure I can think of is:- {code:java} Assert.assertEquals(i + 1, e.getIndex()); {code} in the previous patch. It used to check for sequential ordering of entries. This would fail if there is a NO-OP in between the send calls. I have changed the logic to something like what you suggested for e.getTerm(). Now the check done is:- {code:java} Assert.assertTrue(e.getIndex() > logIndex); logIndex = e.getIndex(); {code} We are already checking the number of non NO-OP entries to be equal to messages. {code:java} Assert.assertEquals(expectedMessages.length, entries.size()); {code} Therefore I thought the above check could be done? I have tested this patch about 10 times now with no failure. > RaftBasicTests.testBasicAppendEntries may fail > ---------------------------------------------- > > Key: RATIS-137 > URL: https://issues.apache.org/jira/browse/RATIS-137 > Project: Ratis > Issue Type: Bug > Reporter: Tsz Wo Nicholas Sze > Assignee: Lokesh Jain > Attachments: RATIS-137.001.patch, RATIS-137.002.patch, > RATIS-137.003.patch > > > [~atrivedi] reported in RATIS-72 that the test may fail. > {code} > TestRaftWithHadoopRpc>RaftBasicTests.testBasicAppendEntries:127->RaftBasicTests.lambda$testBasicAppendEntries$1:127 > expected:<10> but was:<11> > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)