You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2017/02/20 01:40:57 UTC

[2/5] lucene-solr:master: SOLR-10166: TestLBHttpSolrClient needs to be hardened.

SOLR-10166: TestLBHttpSolrClient needs to be hardened.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9ca3d57b
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9ca3d57b
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9ca3d57b

Branch: refs/heads/master
Commit: 9ca3d57b2bfababb33c8e4d785c681140342710a
Parents: 5fb94ce
Author: markrmiller <ma...@apache.org>
Authored: Sun Feb 19 19:40:48 2017 -0500
Committer: markrmiller <ma...@apache.org>
Committed: Sun Feb 19 20:38:31 2017 -0500

----------------------------------------------------------------------
 .../org/apache/solr/client/solrj/TestLBHttpSolrClient.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9ca3d57b/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrClient.java b/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrClient.java
index 64e90c3..964ea26 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrClient.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/TestLBHttpSolrClient.java
@@ -207,8 +207,8 @@ public class TestLBHttpSolrClient extends SolrTestCaseJ4 {
     CloseableHttpClient myHttpClient = HttpClientUtil.createClient(null);
     try {
       LBHttpSolrClient client = getLBHttpSolrClient(myHttpClient, s);
-      client.setConnectionTimeout(250);
-      client.setSoTimeout(250);
+      client.setConnectionTimeout(500);
+      client.setSoTimeout(500);
       client.setAliveCheckInterval(500);
   
       // Kill a server and test again
@@ -242,6 +242,8 @@ public class TestLBHttpSolrClient extends SolrTestCaseJ4 {
       String name = resp.getResults().get(0).getFieldValue("name").toString();
       if (name.equals(serverName))
         return;
+      
+      Thread.sleep(500);
     }
   }