zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anmolnar <...@git.apache.org>
Subject [GitHub] zookeeper pull request #521: ZOOKEEPER-3042: testFailedTxnAsPartOfQuorumLoss...
Date Wed, 16 May 2018 19:56:02 GMT
Github user anmolnar commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/521#discussion_r188752138
  
    --- Diff: src/java/test/org/apache/zookeeper/server/quorum/QuorumPeerMainTest.java ---
    @@ -967,9 +980,10 @@ public void testFailedTxnAsPartOfQuorumLoss() throws Exception {
     
             // just make sure that we actually did get it in process at the
             // leader
    -        Assert.assertEquals(1, outstanding.size());
    -        Proposal p = outstanding.values().iterator().next();
    -        Assert.assertEquals(OpCode.create, p.request.getHdr().getType());
    +        // there can be extra sessionClose proposals
    +        Assert.assertTrue(outstanding.size() > 0);
    +        Proposal p = findProposalOfType(outstanding, OpCode.create);
    +        Assert.assertNotNull(p);
    --- End diff --
    
    Please add some message to the assert here to explain what could have gone wrong.


---

Mime
View raw message