Skip to content

Commit

Permalink
Merge branch '6.0.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
sdeleuze committed Oct 24, 2023
2 parents 1022e09 + 7874a59 commit a71eb3f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -701,18 +701,6 @@ void filterForErrorHandling(ClientHttpRequestFactory requestFactory) {
}


@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<MockResponse> consumer) {
MockResponse response = new MockResponse();
consumer.accept(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1198,23 +1198,6 @@ void exchangeResponseCookies(ClientHttpConnector connector) {
expectRequestCount(1);
}

@ParameterizedWebClientTest
void invalidDomain(ClientHttpConnector connector) {
startServer(connector);

String url = "http://example.invalid";
Mono<Void> 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);
Expand Down

0 comments on commit a71eb3f

Please sign in to comment.