mirror of https://github.com/apache/lucene.git
tests: raise zk connect timeout when building zk for tests
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1573257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
56babb8368
commit
5d7c4f5361
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue