morissm commented on a change in pull request #417: Fixes SOLR-12550:
ConcurrentUpdateSolrClient doesn't respect timeouts for commits and optimize
URL: https://github.com/apache/lucene-solr/pull/417#discussion_r380970071
##########
File path:
solr/solrj/src/test/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClientTest.java
##########
@@ -346,4 +347,25 @@ public OutcomeCountingConcurrentUpdateSolrClient build() {
}
}
}
+
+ /**
+ * Test that connection timeout information is passed to the HttpSolrClient
that handle non add operations
+ */
+ @Test(timeout = 1000)
+ public void testConnectionTimeoutOnCommit() throws IOException,
SolrServerException {
+ // 240.0.0.0/4 is reserved for future use by the IANA and is in effect a
black hole
+ try (ConcurrentUpdateSolrClient client = new
ConcurrentUpdateSolrClient.Builder("http://240.0.0.1:8983/")
Review comment:
You are right, this test fails on current master. (This PR is quite
ancient.)
Unfortunately, DEAD_HOST does not work either. For this test to actually
test the right condition, the connection needs to time out and not fail on
connection.
I have updated the pull request with another solution that works within
current security policy and fails quite fast (1 ms).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]