diff --git a/spring-web/src/test/java/org/springframework/web/client/RestClientIntegrationTests.java b/spring-web/src/test/java/org/springframework/web/client/RestClientIntegrationTests.java index 217d08bb4a..2f22989615 100644 --- a/spring-web/src/test/java/org/springframework/web/client/RestClientIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/web/client/RestClientIntegrationTests.java @@ -701,18 +701,6 @@ class RestClientIntegrationTests { } - @ParameterizedRestClientTest - void invalidDomain(ClientHttpRequestFactory requestFactory) { - startServer(requestFactory); - - String url = "http://example.invalid"; - assertThatExceptionOfType(ResourceAccessException.class).isThrownBy(() -> - this.restClient.get().uri(url).retrieve().toBodilessEntity() - ); - - } - - private void prepareResponse(Consumer consumer) { MockResponse response = new MockResponse(); consumer.accept(response); diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java index 0a0f94f4b4..a55db81ffa 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java @@ -1198,23 +1198,6 @@ class WebClientIntegrationTests { expectRequestCount(1); } - @ParameterizedWebClientTest - void invalidDomain(ClientHttpConnector connector) { - startServer(connector); - - String url = "http://example.invalid"; - Mono result = this.webClient.get().uri(url).retrieve().bodyToMono(Void.class); - - StepVerifier.create(result) - .expectErrorSatisfies(throwable -> { - assertThat(throwable).isInstanceOf(WebClientRequestException.class); - WebClientRequestException ex = (WebClientRequestException) throwable; - assertThat(ex.getMethod()).isEqualTo(HttpMethod.GET); - assertThat(ex.getUri()).isEqualTo(URI.create(url)); - }) - .verify(); - } - @ParameterizedWebClientTest void malformedResponseChunksOnBodilessEntity(ClientHttpConnector connector) { Mono result = doMalformedChunkedResponseTest(connector, ResponseSpec::toBodilessEntity);