tests: remove retry loop

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@981245 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-08-01 15:29:09 +00:00
parent 8bfc318bbf
commit 99bcf03162
1 changed files with 2 additions and 14 deletions

View File

@ -452,20 +452,8 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
//this doc is added to slave so it should show an item w/ that result //this doc is added to slave so it should show an item w/ that result
SolrDocumentList slaveQueryResult = null; SolrDocumentList slaveQueryResult = null;
NamedList slaveQueryRsp; NamedList slaveQueryRsp;
// try a few times in case tests are running slow slaveQueryRsp = rQuery(1, "id:555", slaveClient);
for (int i = 0; i < 30; i++) { slaveQueryResult = (SolrDocumentList) slaveQueryRsp.get("response");
slaveQueryRsp = rQuery(1, "id:555", slaveClient);
slaveQueryResult = (SolrDocumentList) slaveQueryRsp.get("response");
if (slaveQueryResult.getNumFound() > 0) {
break;
}
Thread.sleep(100);
// The last commit may have failed due to exceeding max warming searchers.
// We'll try again.
slaveClient.commit(true, true);
}
assertNotNull(slaveQueryResult);
assertEquals(1, slaveQueryResult.getNumFound()); assertEquals(1, slaveQueryResult.getNumFound());
masterUrl = "http://localhost:" + masterJetty.getLocalPort() + "/solr/replication?command=enableReplication"; masterUrl = "http://localhost:" + masterJetty.getLocalPort() + "/solr/replication?command=enableReplication";