diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java index ba925fcf350..aa31d7f6668 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandlerIntegrationTests.java @@ -335,7 +335,7 @@ public class DefaultErrorWebExceptionHandlerIntegrationTests { @GetMapping("/commit") public Mono commit(ServerWebExchange exchange) { - return exchange.getResponse().writeWith(Mono.empty()).then( + return exchange.getResponse().setComplete().then( Mono.error(new IllegalStateException("already committed!"))); }