zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lavacat <...@git.apache.org>
Subject [GitHub] zookeeper pull request #500: ZOOKEEPER-2959: ignore accepted epoch and LEADE...
Date Thu, 12 Apr 2018 08:27:28 GMT
Github user lavacat commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/500#discussion_r181001854
  
    --- Diff: src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java ---
    @@ -245,6 +245,180 @@ public void testLastAcceptedEpoch() throws Exception {
                 recursiveDelete(tmpDir);
             }
         }
    +
    +    @Test
    +    public void testGetEpochToProposeWithObserver() throws Exception {
    +        File tmpDir = File.createTempFile("test", "dir", testData);
    +        tmpDir.delete();
    +        tmpDir.mkdir();
    +        Leader leader = null;
    +        try {
    +            QuorumPeer peer = createQuorumPeer(tmpDir);
    +            long participantId = 1;
    +            long observerId = peer.quorumPeers.size();
    +            peer.quorumPeers.put(observerId, new QuorumServer(observerId, "0.0.0.0",
33225,
    --- End diff --
    
    Do you mean using PortAssignment.unique() and "127.0.0.1"? Changed it.


---

Mime
View raw message