SEARCH-492: Incrementally waiting for cores

This commit is contained in:
Gethin James
2017-07-28 17:54:03 +02:00
parent db28f98f5b
commit 0c07b40e92
@@ -497,6 +497,7 @@ public abstract class AbstractAlfrescoDistributedTest extends SolrTestCaseJ4
{
long timeout = startMillis + waitMillis;
int totalHits = 0;
int increment = 1;
while(new Date().getTime() < timeout)
{
RefCounted<SolrIndexSearcher> refCounted = null;
@@ -508,7 +509,7 @@ public abstract class AbstractAlfrescoDistributedTest extends SolrTestCaseJ4
if (topDocs.totalHits == expectedNumFound) {
return;
} else {
Thread.sleep(2000);
Thread.sleep(500 * increment++);
}
} finally {
refCounted.decref();