You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "rahulrane50 (via GitHub)" <gi...@apache.org> on 2023/06/21 18:38:52 UTC

[GitHub] [helix] rahulrane50 commented on a diff in pull request #2532: Fix CI: testPostRequestFormat::TestCustomRestClient

rahulrane50 commented on code in PR #2532:
URL: https://github.com/apache/helix/pull/2532#discussion_r1237430716


##########
helix-rest/src/test/java/org/apache/helix/rest/client/TestCustomRestClient.java:
##########
@@ -158,11 +158,12 @@ public void testPostRequestFormat() throws IOException {
     final String echoServer = "http://httpbin.org/post";
     CustomRestClientImpl customRestClient = new CustomRestClientImpl(HttpClients.createDefault());
     HttpResponse response = customRestClient.post(echoServer, Collections.emptyMap());
-    JsonNode json = customRestClient.getJsonObject(response);
+    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {

Review Comment:
   Shouldn't we assert in else block as well? Or we are expecting any other status code is fine?



-- 
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: reviews-unsubscribe@helix.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org