SOLR-11015: Use a higher socket timeout for creating testcollection in ChaosMonkeyNothingIsSafe*

This commit is contained in:
Tomas Fernandez Lobbe 2017-07-05 14:01:24 -07:00
parent 7c704d5258
commit 16a1a6f76f
2 changed files with 12 additions and 4 deletions

View File

@ -102,7 +102,11 @@ public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase
@Override
protected CloudSolrClient createCloudClient(String defaultCollection) {
CloudSolrClient client = getCloudSolrClient(zkServer.getZkAddress(), random().nextBoolean(), 30000, clientSoTimeout);
return this.createCloudClient(defaultCollection, this.clientSoTimeout);
}
protected CloudSolrClient createCloudClient(String defaultCollection, int socketTimeout) {
CloudSolrClient client = getCloudSolrClient(zkServer.getZkAddress(), random().nextBoolean(), 30000, socketTimeout);
client.setParallelUpdates(random().nextBoolean());
if (defaultCollection != null) client.setDefaultCollection(defaultCollection);
return client;
@ -250,7 +254,7 @@ public class ChaosMonkeyNothingIsSafeTest extends AbstractFullDistribZkTestBase
restartZk(1000 * (5 + random().nextInt(4)));
}
try (CloudSolrClient client = createCloudClient("collection1")) {
try (CloudSolrClient client = createCloudClient("collection1", 30000)) {
createCollection(null, "testcollection",
1, 1, 1, client, null, "conf1");

View File

@ -125,7 +125,11 @@ public class ChaosMonkeyNothingIsSafeWithPullReplicasTest extends AbstractFullDi
@Override
protected CloudSolrClient createCloudClient(String defaultCollection) {
CloudSolrClient client = getCloudSolrClient(zkServer.getZkAddress(), random().nextBoolean(), 30000, clientSoTimeout);
return this.createCloudClient(defaultCollection, this.clientSoTimeout);
}
protected CloudSolrClient createCloudClient(String defaultCollection, int socketTimeout) {
CloudSolrClient client = getCloudSolrClient(zkServer.getZkAddress(), random().nextBoolean(), 30000, socketTimeout);
client.setParallelUpdates(random().nextBoolean());
if (defaultCollection != null) client.setDefaultCollection(defaultCollection);
return client;
@ -292,7 +296,7 @@ public class ChaosMonkeyNothingIsSafeWithPullReplicasTest extends AbstractFullDi
restartZk(1000 * (5 + random().nextInt(4)));
}
try (CloudSolrClient client = createCloudClient("collection1")) {
try (CloudSolrClient client = createCloudClient("collection1", 30000)) {
// We don't really know how many live nodes we have at this point, so "maxShardsPerNode" needs to be > 1
createCollection(null, "testcollection",
1, 1, 10, client, null, "conf1");