Browse Source

Merge branch '6.0.x'

pull/30079/head
Sébastien Deleuze 1 year ago
parent
commit
a71eb3fb08
  1. 12
      spring-web/src/test/java/org/springframework/web/client/RestClientIntegrationTests.java
  2. 17
      spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java

12
spring-web/src/test/java/org/springframework/web/client/RestClientIntegrationTests.java

@ -701,18 +701,6 @@ class RestClientIntegrationTests { @@ -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<MockResponse> consumer) {
MockResponse response = new MockResponse();
consumer.accept(response);

17
spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java

@ -1198,23 +1198,6 @@ class WebClientIntegrationTests { @@ -1198,23 +1198,6 @@ class WebClientIntegrationTests {
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);

Loading…
Cancel
Save