Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ZOOKEEPER-1578. org.apache.zookeeper.server.quorum.Zab1_0Test failed …

…due to hard code with 33556 port. (Li Ping via mahadev)

git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1422772 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 835d03ebb81b319944153aca7033410e2d1f8653 1 parent e888c68
Mahadev Konar authored
View
3  CHANGES.txt
@@ -290,6 +290,9 @@ BUGFIXES:
ZOOKEEPER-1387. Wrong epoch file created
(Benjamin Busjaeger via breed, phunt)
+ ZOOKEEPER-1578. org.apache.zookeeper.server.quorum.Zab1_0Test failed due to
+ hard code with 33556 port (Li Ping via mahadev)
+
IMPROVEMENTS:
ZOOKEEPER-1170. Fix compiler (eclipse) warnings: unused imports,
View
3  src/java/test/org/apache/zookeeper/server/quorum/Zab1_0Test.java
@@ -38,6 +38,7 @@
import org.apache.jute.BinaryOutputArchive;
import org.apache.jute.InputArchive;
import org.apache.jute.OutputArchive;
+import org.apache.zookeeper.PortAssignment;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.Watcher.Event.EventType;
@@ -957,7 +958,7 @@ private LeaderZooKeeperServer prepareLeader(File tmpDir, QuorumPeer peer)
peer.setTxnFactory(logFactory);
Field addrField = peer.getClass().getDeclaredField("myQuorumAddr");
addrField.setAccessible(true);
- addrField.set(peer, new InetSocketAddress(33556));
+ addrField.set(peer, new InetSocketAddress(PortAssignment.unique()));
ZKDatabase zkDb = new ZKDatabase(logFactory);
LeaderZooKeeperServer zk = new LeaderZooKeeperServer(logFactory, peer, zkDb);
return zk;
Please sign in to comment.
Something went wrong with that request. Please try again.