dsmiley commented on code in PR #4247:
URL: https://github.com/apache/solr/pull/4247#discussion_r3006686048


##########
solr/core/src/test/org/apache/solr/handler/admin/HealthCheckHandlerTest.java:
##########
@@ -172,20 +169,17 @@ public void testV1FailureResponseIncludesStatusField() 
throws Exception {
       // Use a raw HTTP request so we can inspect the full response body.
       // SolrJ's HealthCheckRequest throws RemoteSolrException on non-200 
responses and does
       // not expose the response body, so we go below SolrJ here.
-      try (HttpClient httpClient = HttpClient.newHttpClient()) {
-        HttpResponse<String> response =
-            httpClient.send(
-                HttpRequest.newBuilder()
-                    .uri(URI.create(newJetty.getBaseUrl() + 
HEALTH_CHECK_HANDLER_PATH))
-                    .build(),
-                HttpResponse.BodyHandlers.ofString());
-
-        assertEquals("Expected 503 SERVICE_UNAVAILABLE", 503, 
response.statusCode());
-        assertThat(
-            "v1 error response body must contain status=FAILURE so 
body-inspecting clients get a clear signal",
-            response.body(),
-            containsString("FAILURE"));
-      }
+      ContentResponse response =

Review Comment:
   Instead of creating a client, this PR uses the *very new* (like hours ago) 
`JettySolrRunner.getSolrClient` to return a HttpJettySolrClient.  That in turn 
has `getHttpClient` -- Jetty based (not JDK) -- obviously.



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