DefaultZkConfig implements ZkConfig { @Override public int getZkConnectionTimeoutMillis() { return zkConnectionTimeoutMillis; }  @Override int getZkConnectionTimeoutMillis(); void setZkConnectionTimeoutMillis(int zkConnectionTimeoutMillis); @Override int getZkCloseWaitMillis(); @Override String getZkNamespace(); void setZkNameSpace(String zkNameSpace); @Override int getZkRetries(); void setZkRetries(int zkRetries); @Override int getSleepMsBetweenRetries(); @Override int getZkSessionTimeoutMillis(); void setZkSessionTimeoutMillis(int zkSessionTimeoutMillis); @Override int waitForZkConnectedMillis(); @Override CuratorFramework create(String address); static String KEY_ZK_NAMESPACE; }
@Test public void testGetZkConnectionTimeoutMillisDefaultValue() { zkConfig = new DefaultZkConfig(); Assert.assertEquals(3000, zkConfig.getZkConnectionTimeoutMillis()); }
@Test public void testGetZkConnectionTimeoutMillis() { System.setProperty("ZK.CONN.TIMEOUT", "1000"); zkConfig = new DefaultZkConfig(); Assert.assertEquals(1000, zkConfig.getZkConnectionTimeoutMillis()); }