alirezazamani commented on a change in pull request #1013:
URL: https://github.com/apache/helix/pull/1013#discussion_r428293447



##########
File path: 
helix-rest/src/test/java/org/apache/helix/rest/client/TestCustomRestClient.java
##########
@@ -161,4 +179,35 @@ protected JsonNode getJsonObject(HttpResponse 
httpResponse) throws IOException {
       return new ObjectMapper().readTree(_jsonResponse);
     }
   }
+
+  /**
+   * This MockCustomRestClientFactory is necessary to have for testing because 
once an INSTANCE is
+   * initialized in CustomRestClientFactory while running "mvn test" , it will 
no re-initialize the
+   * INSTANCE with new HelixProperty. Hence this class makes sure that new 
CustomRestClient will be
+   * created with the timeout set to the new value.
+   */
+  private static class MockCustomRestClientFactory extends 
CustomRestClientFactory {
+    private static final int DEFAULT_HTTP_REQUEST_TIMEOUT = 60 * 1000;

Review comment:
       I added comments about it. I removed the default constant and directly 
uses the value in getSystemPropertyAsInt to avoid creating new constants. I 
found some other default values in for http request for MSDS related code. 
However, I am not sure if that is a good idea to have one default for 
everything. Anyway, please have a look and see if this makes sense.




----------------------------------------------------------------
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]



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

Reply via email to