Merge remote-tracking branch 'origin/master' into rel_7_8_tracking

This commit is contained in:
dotasek
2025-02-11 10:51:05 -05:00

View File

@@ -41,6 +41,7 @@ import org.springframework.boot.test.web.server.LocalServerPort;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@@ -315,10 +316,10 @@ class ExampleServerR4IT implements IServerSupport {
@ParameterizedTest @ParameterizedTest
@ValueSource(strings = {"prometheus", "health", "metrics", "info"}) @ValueSource(strings = {"prometheus", "health", "metrics", "info"})
void testActuatorEndpointExists(String endpoint) throws IOException { void testActuatorEndpointExists(String endpoint) throws IOException, URISyntaxException {
CloseableHttpClient httpclient = HttpClients.createDefault(); CloseableHttpClient httpclient = HttpClients.createDefault();
CloseableHttpResponse response = httpclient.execute(new HttpGet("http://localhost:" + port + "/actuator/" + endpoint)); CloseableHttpResponse response = httpclient.execute(new HttpGet(new URI("http", null, "localhost", port, "/actuator/" + endpoint, null, null)));
int statusCode = response.getStatusLine().getStatusCode(); int statusCode = response.getStatusLine().getStatusCode();
assertEquals(200, statusCode); assertEquals(200, statusCode);