lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r782691 - /lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
Date Mon, 08 Jun 2009 16:07:12 GMT
Author: markrmiller
Date: Mon Jun  8 16:07:12 2009
New Revision: 782691

URL: http://svn.apache.org/viewvc?rev=782691&view=rev
Log:
add a wait and retry for test that can fail on slower/busy machines

Modified:
    lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExampleTests.java

Modified: lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExampleTests.java?rev=782691&r1=782690&r2=782691&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExampleTests.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/client/solrj/SolrExampleTests.java Mon Jun
 8 16:07:12 2009
@@ -229,6 +229,14 @@
 
     // 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() );
   }
   



Mime
View raw message