mirror of https://github.com/apache/lucene.git
SOLR-7921: Fix non-reproducible test failure on sarowe's Jenkins by adding a brief wait before checking that tech product docs have been committed to the example server
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1695752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7ebc890bec
commit
2d7df11ab8
|
@ -344,7 +344,17 @@ public class TestSolrCLIRunExample extends SolrTestCaseJ4 {
|
|||
SolrQuery query = new SolrQuery("*:*");
|
||||
QueryResponse qr = solrClient.query(query);
|
||||
long numFound = qr.getResults().getNumFound();
|
||||
assertTrue("expected 32 docs in the "+exampleName+" example but found " + numFound + ", output: " + toolOutput,
|
||||
if (numFound == 0) {
|
||||
// brief wait in case of timing issue in getting the new docs committed
|
||||
log.warn("Going to wait for 1 second before re-trying query for techproduct example docs ...");
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException ignore) {
|
||||
Thread.interrupted();
|
||||
}
|
||||
numFound = solrClient.query(query).getResults().getNumFound();
|
||||
}
|
||||
assertTrue("expected 32 docs in the " + exampleName + " example but found " + numFound + ", output: " + toolOutput,
|
||||
numFound == 32);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue