You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mk...@apache.org on 2016/10/09 15:26:18 UTC

lucene-solr:branch_6x: SOLR-9604, SOLR-9608: fix HttpSolrClientConPoolTest.testPoolSize()

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x f247acfab -> 2b5fc01a5


SOLR-9604,SOLR-9608: fix HttpSolrClientConPoolTest.testPoolSize() 

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

Branch: refs/heads/branch_6x
Commit: 2b5fc01a5d6b1bb2245fa0d5cf854637020f0c97
Parents: f247acf
Author: Mikhail Khludnev <mk...@apache.org>
Authored: Sun Oct 9 18:17:49 2016 +0300
Committer: Mikhail Khludnev <mk...@apache.org>
Committed: Sun Oct 9 18:24:07 2016 +0300

----------------------------------------------------------------------
 .../org/apache/solr/client/solrj/impl/HttpClientUtil.java     | 7 +------
 .../solr/client/solrj/impl/HttpSolrClientConPoolTest.java     | 7 +++++++
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2b5fc01a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
index d4fe61c..b8b7400 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
@@ -442,12 +442,7 @@ public class HttpClientUtil {
   /**
    * Create a HttpClientContext object and {@link HttpClientContext#setUserToken(Object)}
    * to an internal singleton. It allows to reuse underneath {@link HttpClient} 
-   * in connection pools 
-   *
-   * If the client is going to be re-used, then you should pass in an object that
-   * can be used by internal connection pools as a cache key.  This is particularly
-   * important if client authentication is enabled, as SSL connections will not
-   * be re-used if no cache key is provided.
+   * in connection pools if client authentication is enabled.
    *
    */
   public static HttpClientContext createNewHttpClientRequestContext() {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2b5fc01a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientConPoolTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientConPoolTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientConPoolTest.java
index e6f63ae..b52c99c 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientConPoolTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientConPoolTest.java
@@ -79,6 +79,13 @@ public class HttpSolrClientConPoolTest extends SolrJettyTestBase {
       }
     }
     
+    {
+      client1.setBaseURL(fooUrl);
+      client1.deleteByQuery("*:*");
+      client1.setBaseURL(barUrl);
+      client1.deleteByQuery("*:*");
+    }
+    
     List<String> urls = new ArrayList<>();
     for(int i=0; i<17; i++) {
       urls.add(fooUrl);