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 111b4e42cb..f26dc343f5 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 @@ -354,7 +354,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!"))); }