mirror of https://github.com/apache/lucene.git
add a wait and retry for test that can fail on slower/busy machines
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@782691 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c1efe96c47
commit
74c10140ce
|
@ -229,6 +229,14 @@ abstract public class SolrExampleTests extends SolrExampleTestBase
|
|||
|
||||
// now check that it comes out...
|
||||
rsp = server.query( new SolrQuery( "id:id3") );
|
||||
|
||||
if(rsp.getResults().getNumFound() == 0) {
|
||||
// wait and try again for slower machines
|
||||
Thread.sleep( 2000 ); // wait 1/2 seconds...
|
||||
|
||||
rsp = server.query( new SolrQuery( "id:id3") );
|
||||
}
|
||||
|
||||
Assert.assertEquals( 1, rsp.getResults().getNumFound() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue