Description
After some digging I found this code in ZkTestServer:
public void run() throws InterruptedException { log.info("STARTING ZK TEST SERVER"); // we don't call super.distribSetUp zooThread = new Thread() { @Override public void run() { ServerConfig config = new ServerConfig() { { setClientPort(ZkTestServer.this.clientPort); this.dataDir = zkDir; this.dataLogDir = zkDir; this.tickTime = theTickTime; } public void setClientPort(int clientPort) { if (clientPortAddress != null) { try { this.clientPortAddress = new InetSocketAddress( InetAddress.getByName(clientPortAddress.getHostName()), clientPort); } catch (UnknownHostException e) { throw new RuntimeException(e); } } else { this.clientPortAddress = new InetSocketAddress(clientPort); } log.info("client port:" + this.clientPortAddress); } }; try { zkServer.runFromConfig(config); } catch (Throwable e) { throw new RuntimeException(e); } } };
And what I noticed is that min/max timeouts are unset and theTickTime is onlly ever set to a big blue 1000 leading to default min/max timeout values of 2/20 seconds (https://discuss.pivotal.io/hc/en-us/articles/205187157-Pivotal-HD-About-how-to-correctly-config-zookeeper-session-timeout-parameter-minSessionTimeout-and-maxSessionTimeout --> jibes with the zk code I see in my editor).
I suggest we provide explicit min/max configs in the anonymous inner class here setting them back to the 3/60 defaults.