mirror of https://github.com/apache/lucene.git
add extra pause and retry for test that fails on slower comp
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@782658 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2e5960f5e6
commit
5f02ccf9ec
|
@ -137,7 +137,13 @@ public class TestLBHttpSolrServer extends TestCase {
|
|||
solr[1].jetty = null;
|
||||
solr[0].startJetty();
|
||||
Thread.sleep(1200);
|
||||
resp = lbHttpSolrServer.query(solrQuery);
|
||||
try {
|
||||
resp = lbHttpSolrServer.query(solrQuery);
|
||||
} catch(SolrServerException e) {
|
||||
// try again after a pause in case the error is lack of time to start server
|
||||
Thread.sleep(3000);
|
||||
resp = lbHttpSolrServer.query(solrQuery);
|
||||
}
|
||||
name = resp.getResults().get(0).getFieldValue("name").toString();
|
||||
Assert.assertEquals("solr0", name);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue