From 2b5fc01a5d6b1bb2245fa0d5cf854637020f0c97 Mon Sep 17 00:00:00 2001 From: Mikhail Khludnev Date: Sun, 9 Oct 2016 18:17:49 +0300 Subject: [PATCH] SOLR-9604,SOLR-9608: fix HttpSolrClientConPoolTest.testPoolSize() --- .../org/apache/solr/client/solrj/impl/HttpClientUtil.java | 7 +------ .../solr/client/solrj/impl/HttpSolrClientConPoolTest.java | 7 +++++++ 2 files changed, 8 insertions(+), 6 deletions(-) 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 d4fe61ca560..b8b7400f0da 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() { 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 e6f63aeb480..b52c99c50ad 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 urls = new ArrayList<>(); for(int i=0; i<17; i++) { urls.add(fooUrl);