alirezazamani commented on a change in pull request #1013:
URL: https://github.com/apache/helix/pull/1013#discussion_r428153466
##########
File path:
helix-rest/src/test/java/org/apache/helix/rest/client/TestCustomRestClient.java
##########
@@ -145,6 +150,19 @@ public void testPostRequestFormat() throws IOException {
Assert.assertEquals(json.get("data").asText(), "{}");
}
+ @Test(expectedExceptions = ConnectTimeoutException.class)
+ public void testPostRequestSmallTimeout() throws IOException {
+ // Set 1 ms to cause timeout for requests
+ System.setProperty(SystemPropertyKeys.HTTP_REQUEST_TIMEOUT, "1");
+ // a popular echo server that echos all the inputs
+ final String echoServer = "http://httpbin.org/post";
+ CustomRestClient _customRestClient = MockCustomRestClientFactory.get();
+ _customRestClient.getInstanceStoppableCheck(echoServer,
Collections.emptyMap());
Review comment:
Basically wanted to check getInstanceStoppableCheck. I will change the
Test's name. And I will change it to try catch.
----------------------------------------------------------------
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]