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.


---

Reply via email to