diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java index f765542403f..a2873e0c9c4 100644 --- a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java +++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java @@ -22,9 +22,7 @@ import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; import java.util.List; -import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicLong; import javax.xml.transform.OutputKeys; @@ -85,6 +83,10 @@ public class SolrZkClient { this(zkServerAddress, zkClientTimeout, new DefaultConnectionStrategy(), null); } + public SolrZkClient(String zkServerAddress, int zkClientTimeout, int zkClientConnectTimeout) { + this(zkServerAddress, zkClientTimeout, zkClientConnectTimeout, new DefaultConnectionStrategy(), null); + } + public SolrZkClient(String zkServerAddress, int zkClientTimeout, int zkClientConnectTimeout, OnReconnect onReonnect) { this(zkServerAddress, zkClientTimeout, zkClientConnectTimeout, new DefaultConnectionStrategy(), onReonnect); } diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractZkTestCase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractZkTestCase.java index 41427ab31a2..ec3625ab3d0 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractZkTestCase.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractZkTestCase.java @@ -86,7 +86,7 @@ public abstract class AbstractZkTestCase extends SolrTestCaseJ4 { // static to share with distrib test public static void buildZooKeeper(String zkHost, String zkAddress, File solrhome, String config, String schema) throws Exception { - SolrZkClient zkClient = new SolrZkClient(zkHost, AbstractZkTestCase.TIMEOUT); + SolrZkClient zkClient = new SolrZkClient(zkHost, AbstractZkTestCase.TIMEOUT, 45000, null); zkClient.makePath("/solr", false, true); zkClient.close();