Github user phunt commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/377#discussion_r163420180 --- Diff: src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java --- @@ -476,9 +474,12 @@ public ZooKeeperServerListener getZooKeeperServerListener() { return listener; } + // Visible for testing + static volatile int serverId = 1; --- End diff -- I looked at it a bit originally, iirc I figured that you'd pass it through in some way (during instance creation) rather than making it a global.
---