epugh commented on code in PR #1565:
URL: https://github.com/apache/solr/pull/1565#discussion_r1178220595


##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpSolrClientBuilderTest.java:
##########
@@ -51,6 +52,22 @@ public void testProvidesHttpClientToClient() throws 
IOException {
     }
   }
 
+  @AwaitsFix(bugUrl = "https://issues.apache.org/jira/browse/SOLR-13605";)
+  @Test
+  public void testUsesTimeoutProvidedByHttpClient() throws IOException {
+
+    ModifiableSolrParams clientParams = new ModifiableSolrParams();
+    clientParams.set(HttpClientUtil.PROP_SO_TIMEOUT, 12345);
+    clientParams.set(HttpClientUtil.PROP_CONNECTION_TIMEOUT, 67890);
+    HttpClient httpClient = HttpClientUtil.createClient(clientParams);
+    try (HttpSolrClient createdClient =
+        new Builder(ANY_BASE_SOLR_URL).withHttpClient(httpClient).build()) {
+      assertEquals(createdClient.getHttpClient(), httpClient);
+      assertEquals(67890, createdClient.getConnectionTimeout());
+      assertEquals(12345, createdClient.getSocketTimeout());
+    }
+  }

Review Comment:
   YOu are right...    I added the close...   One thing is that I think there 
are other tests that don't do this closing, like AdminHandlersProxyTest....   
THough on second look, I think we are referencing an existing httpClient in 
AdminHandlersProxyTest that maybe gets closed when the parent SolrClient gets 
closed..



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to