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:
Mark Robert Miller 2009-06-08 14:47:40 +00:00
parent 2e5960f5e6
commit 5f02ccf9ec
1 changed files with 7 additions and 1 deletions

View File

@ -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);
}