SOLR-6112: Increase default timeout of 10 seconds to 90 seconds to pass on slow machines

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1597391 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2014-05-25 05:20:57 +00:00
parent 29adbc5bd6
commit a912f7f8f1
1 changed files with 5 additions and 4 deletions

View File

@ -30,6 +30,8 @@ import java.io.IOException;
public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest { public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest {
public static final int MAX_WAIT_TIMEOUT_SECONDS = 90;
public TestRequestStatusCollectionAPI() { public TestRequestStatusCollectionAPI() {
schemaString = "schema15.xml"; // we need a string id schemaString = "schema15.xml"; // we need a string id
} }
@ -60,7 +62,6 @@ public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest {
} }
// Check for the request to be completed. // Check for the request to be completed.
int maxCounter = 10;
NamedList r = null; NamedList r = null;
NamedList status = null; NamedList status = null;
@ -72,7 +73,7 @@ public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest {
params.set(OverseerCollectionProcessor.REQUESTID, "1000"); params.set(OverseerCollectionProcessor.REQUESTID, "1000");
try { try {
message = sendStatusRequestWithRetry(params, 10); message = sendStatusRequestWithRetry(params, MAX_WAIT_TIMEOUT_SECONDS);
} catch (SolrServerException e) { } catch (SolrServerException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IOException e) { } catch (IOException e) {
@ -115,7 +116,7 @@ public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest {
params.set("action", CollectionParams.CollectionAction.REQUESTSTATUS.toString()); params.set("action", CollectionParams.CollectionAction.REQUESTSTATUS.toString());
params.set(OverseerCollectionProcessor.REQUESTID, "1001"); params.set(OverseerCollectionProcessor.REQUESTID, "1001");
try { try {
message = sendStatusRequestWithRetry(params, maxCounter); message = sendStatusRequestWithRetry(params, MAX_WAIT_TIMEOUT_SECONDS);
} catch (SolrServerException e) { } catch (SolrServerException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IOException e) { } catch (IOException e) {
@ -147,7 +148,7 @@ public class TestRequestStatusCollectionAPI extends BasicDistributedZkTest {
params.set(OverseerCollectionProcessor.REQUESTID, "1002"); params.set(OverseerCollectionProcessor.REQUESTID, "1002");
try { try {
message = sendStatusRequestWithRetry(params, 10); message = sendStatusRequestWithRetry(params, MAX_WAIT_TIMEOUT_SECONDS);
} catch (SolrServerException e) { } catch (SolrServerException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IOException e) { } catch (IOException e) {