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

This commit is contained in:
Mikhail Khludnev 2016-10-09 18:17:49 +03:00
parent f247acfab1
commit 2b5fc01a5d
2 changed files with 8 additions and 6 deletions

View File

@ -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() {

View File

@ -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);