Merge branch '5.1.x'

This commit is contained in:
Rossen Stoyanchev
2019-07-05 10:55:49 +01:00
3 changed files with 74 additions and 18 deletions

View File

@@ -147,6 +147,15 @@ public class WebClientDataBufferAllocatingTests extends AbstractDataBufferAlloca
testOnStatus(ex, response -> response.bodyToMono(Void.class).then(Mono.error(ex)));
}
@Test // gh-23230
public void onStatusWithImmediateErrorAndBodyNotConsumed() {
RuntimeException ex = new RuntimeException("response error");
testOnStatus(ex, response -> {
throw ex;
});
}
private void testOnStatus(Throwable expected,
Function<ClientResponse, Mono<? extends Throwable>> exceptionFunction) {