mirror of https://github.com/apache/lucene.git
SOLR-8468: Raise some test zk connection timeouts up from 10 seconds and remove some test timeout magic numbers.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1723888 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8826ea070a
commit
7986b8248f
|
@ -149,7 +149,7 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 {
|
|||
setupBaseConfigSet(baseConfigSetName, oldProps);
|
||||
|
||||
SolrZkClient zkClient = new SolrZkClient(solrCluster.getZkServer().getZkAddress(),
|
||||
AbstractZkTestCase.TIMEOUT, 45000, null);
|
||||
AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null);
|
||||
try {
|
||||
ZkConfigManager configManager = new ZkConfigManager(zkClient);
|
||||
assertFalse(configManager.configExists(configSetName));
|
||||
|
@ -282,7 +282,7 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 {
|
|||
solrCluster.uploadConfigDir(configDir, configSet);
|
||||
|
||||
SolrZkClient zkClient = new SolrZkClient(solrCluster.getZkServer().getZkAddress(),
|
||||
AbstractZkTestCase.TIMEOUT, 45000, null);
|
||||
AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null);
|
||||
try {
|
||||
ZkConfigManager configManager = new ZkConfigManager(zkClient);
|
||||
assertTrue(configManager.configExists(configSet));
|
||||
|
@ -305,7 +305,7 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 {
|
|||
new HttpSolrClient(solrCluster.getJettySolrRunners().get(0).getBaseUrl().toString());
|
||||
|
||||
SolrZkClient zkClient = new SolrZkClient(solrCluster.getZkServer().getZkAddress(),
|
||||
AbstractZkTestCase.TIMEOUT, 45000, null);
|
||||
AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null);
|
||||
try {
|
||||
// test empty
|
||||
List list = new List();
|
||||
|
|
|
@ -107,7 +107,7 @@ public class TestConfigSetsAPIZkFailure extends SolrTestCaseJ4 {
|
|||
setupBaseConfigSet(BASE_CONFIGSET_NAME, oldProps);
|
||||
|
||||
SolrZkClient zkClient = new SolrZkClient(solrCluster.getZkServer().getZkAddress(),
|
||||
AbstractZkTestCase.TIMEOUT, 45000, null);
|
||||
AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null);
|
||||
try {
|
||||
ZkConfigManager configManager = new ZkConfigManager(zkClient);
|
||||
assertFalse(configManager.configExists(CONFIGSET_NAME));
|
||||
|
|
|
@ -303,7 +303,7 @@ public class TestMiniSolrCloudCluster extends LuceneTestCase {
|
|||
}
|
||||
|
||||
try (SolrZkClient zkClient = new SolrZkClient
|
||||
(miniCluster.getZkServer().getZkAddress(), AbstractZkTestCase.TIMEOUT, 45000, null);
|
||||
(miniCluster.getZkServer().getZkAddress(), AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null);
|
||||
ZkStateReader zkStateReader = new ZkStateReader(zkClient)) {
|
||||
|
||||
// wait for collection to appear
|
||||
|
@ -350,7 +350,7 @@ public class TestMiniSolrCloudCluster extends LuceneTestCase {
|
|||
final SolrInputDocument doc = new SolrInputDocument();
|
||||
|
||||
try (SolrZkClient zkClient = new SolrZkClient
|
||||
(miniCluster.getZkServer().getZkAddress(), AbstractZkTestCase.TIMEOUT, 45000, null);
|
||||
(miniCluster.getZkServer().getZkAddress(), AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null);
|
||||
ZkStateReader zkStateReader = new ZkStateReader(zkClient)) {
|
||||
AbstractDistribZkTestBase.waitForRecoveriesToFinish(collectionName, zkStateReader, true, true, 330);
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public class TestMiniSolrCloudClusterBase extends LuceneTestCase {
|
|||
}
|
||||
|
||||
try (SolrZkClient zkClient = new SolrZkClient
|
||||
(miniCluster.getZkServer().getZkAddress(), AbstractZkTestCase.TIMEOUT, 45000, null);
|
||||
(miniCluster.getZkServer().getZkAddress(), AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null);
|
||||
ZkStateReader zkStateReader = new ZkStateReader(zkClient)) {
|
||||
AbstractDistribZkTestBase.waitForRecoveriesToFinish(collectionName, zkStateReader, true, true, 330);
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ public class TestSolrCloudWithKerberosAlt extends LuceneTestCase {
|
|||
createRequest.process(cloudSolrClient);
|
||||
|
||||
try (SolrZkClient zkClient = new SolrZkClient
|
||||
(miniCluster.getZkServer().getZkAddress(), AbstractZkTestCase.TIMEOUT, 45000, null);
|
||||
(miniCluster.getZkServer().getZkAddress(), AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null);
|
||||
ZkStateReader zkStateReader = new ZkStateReader(zkClient)) {
|
||||
AbstractDistribZkTestBase.waitForRecoveriesToFinish(collectionName, zkStateReader, true, true, 330);
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ public class VMParamsZkACLAndCredentialsProvidersTest extends SolrTestCaseJ4 {
|
|||
setSecuritySystemProperties();
|
||||
|
||||
SolrZkClient zkClient = new SolrZkClient(zkServer.getZkHost(),
|
||||
AbstractZkTestCase.TIMEOUT, 60000, null, null, null);
|
||||
AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null, null, null);
|
||||
zkClient.makePath("/solr", false, true);
|
||||
zkClient.close();
|
||||
|
||||
|
|
|
@ -1323,7 +1323,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
|
|||
// do some really inefficient mapping...
|
||||
Map<String,Slice> slices = null;
|
||||
ClusterState clusterState;
|
||||
try (ZkStateReader zk = new ZkStateReader(zkServer.getZkAddress(), 10000,
|
||||
try (ZkStateReader zk = new ZkStateReader(zkServer.getZkAddress(), AbstractZkTestCase.TIMEOUT,
|
||||
AbstractZkTestCase.TIMEOUT)) {
|
||||
zk.createClusterStateWatchersAndUpdate();
|
||||
clusterState = zk.getClusterState();
|
||||
|
|
|
@ -38,7 +38,7 @@ import java.util.Map;
|
|||
public abstract class AbstractZkTestCase extends SolrTestCaseJ4 {
|
||||
private static final String ZOOKEEPER_FORCE_SYNC = "zookeeper.forceSync";
|
||||
|
||||
public static final int TIMEOUT = 10000;
|
||||
public static final int TIMEOUT = 45000;
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
|
@ -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, 45000, null);
|
||||
SolrZkClient zkClient = new SolrZkClient(zkHost, AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null);
|
||||
zkClient.makePath("/solr", false, true);
|
||||
zkClient.close();
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ public class MiniSolrCloudCluster {
|
|||
this.zkServer = zkTestServer;
|
||||
|
||||
try(SolrZkClient zkClient = new SolrZkClient(zkServer.getZkHost(),
|
||||
AbstractZkTestCase.TIMEOUT, 45000, null)) {
|
||||
AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null)) {
|
||||
zkClient.makePath("/solr/solr.xml", solrXml.getBytes(Charset.defaultCharset()), true);
|
||||
if (jettyConfig.sslConfig != null && jettyConfig.sslConfig.isSSLMode()) {
|
||||
zkClient.makePath("/solr" + ZkStateReader.CLUSTER_PROPS, "{'urlScheme':'https'}".getBytes(Charsets.UTF_8), true);
|
||||
|
@ -366,7 +366,7 @@ public class MiniSolrCloudCluster {
|
|||
|
||||
public void uploadConfigDir(File configDir, String configName) throws IOException, KeeperException, InterruptedException {
|
||||
try(SolrZkClient zkClient = new SolrZkClient(zkServer.getZkAddress(),
|
||||
AbstractZkTestCase.TIMEOUT, 45000, null)) {
|
||||
AbstractZkTestCase.TIMEOUT, AbstractZkTestCase.TIMEOUT, null)) {
|
||||
ZkConfigManager manager = new ZkConfigManager(zkClient);
|
||||
manager.uploadConfigDir(configDir.toPath(), configName);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue