capistrant commented on code in PR #19949:
URL: https://github.com/apache/druid/pull/19949#discussion_r3750385093
##########
services/src/test/java/org/apache/druid/testing/embedded/EmbeddedServiceClient.java:
##########
@@ -266,8 +265,10 @@ private <T> T makeRequest(
try {
StatusResponseHolder response = serviceClient.request(requestBuilder,
responseHandler);
- if (!response.getStatus().equals(HttpResponseStatus.OK)
- && !response.getStatus().equals(HttpResponseStatus.ACCEPTED)) {
+
+ // Handle all success status codes
+ final int statusCode = response.getStatus().getCode();
+ if (statusCode < 200 || statusCode >= 300) {
Review Comment:
I suppose doing this makes sense defensively even if no apis currently would
return a 204 No Content that is not handled nicely. non-blocking if tests pass
as is
--
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]