VishnuPriyaChandraSekar commented on code in PR #4626:
URL: https://github.com/apache/solr/pull/4626#discussion_r3555710690


##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/LB2SolrClientTest.java:
##########
@@ -405,6 +405,9 @@ private class TimeoutZombieTestContext implements 
AutoCloseable {
           new HttpJettySolrClient.Builder()
               .withConnectionTimeout(1000, TimeUnit.MILLISECONDS)
               .withIdleTimeout(1, TimeUnit.MILLISECONDS)
+              // override the infinite request timeout with idle timeout to 
ensure idle requests
+              // times out.

Review Comment:
   > idle refers to the longest period of not receiving any data at all from 
the server.
   
   My understanding is that idle timeout kicks in after processing response 
from server and before initiating the next request. Thus idle timeout makes 
sense when the socket is reused for another HTTP request. While request timeout 
kicks in when client sends a request and waits for server to respond. 
   
   I find contradicting to use idleTimeout for test case as it makes a single 
http request. Please correct me if my understanding is incorrect. 
   
   ```
   public void testTimeoutExceptionMarksServerAsZombie() throws Exception {
       try (TimeoutZombieTestContext ctx = new TimeoutZombieTestContext()) {
         LBSolrClient.Req lbReq = ctx.createQueryRequest();
   
         try {
           ctx.lbClient.request(lbReq);
         } catch (Exception e) {
         }
   
         ctx.assertZombieState();
       }
     }
   ```
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to