lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r782658 - /lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java
Date Mon, 08 Jun 2009 14:47:41 GMT
Author: markrmiller
Date: Mon Jun  8 14:47:40 2009
New Revision: 782658

URL: http://svn.apache.org/viewvc?rev=782658&view=rev
Log:
add extra pause and retry for test that fails on slower comp

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

Modified: lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java?rev=782658&r1=782657&r2=782658&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/client/solrj/TestLBHttpSolrServer.java Mon
Jun  8 14:47:40 2009
@@ -137,7 +137,13 @@
     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);
   }



Mime
View raw message