From 0c5bb60384fd8b3b94e5e212f92530b35cd18b0d Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Fri, 22 Nov 2019 20:56:43 +0100 Subject: [PATCH] Fix responseCommitted test in webflux error handling This commit updates the `responseCommitted` after changes were made in `WebTestClient` with spring-projects/spring-framework#24051. Fixes gh-19083 --- .../DefaultErrorWebExceptionHandlerIntegrationTests.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 d2b84b1b5b..f3ec017108 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 @@ -20,7 +20,6 @@ import java.nio.charset.StandardCharsets; import javax.validation.Valid; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import reactor.core.publisher.Mono; @@ -214,13 +213,13 @@ class DefaultErrorWebExceptionHandlerIntegrationTests { } @Test - @Disabled void responseCommitted() { this.contextRunner.run((context) -> { WebTestClient client = getWebClient(context); assertThatExceptionOfType(RuntimeException.class) .isThrownBy(() -> client.get().uri("/commit").exchange().expectStatus()) - .withCauseInstanceOf(IllegalStateException.class).withMessageContaining("already committed!"); + .withCauseInstanceOf(IllegalStateException.class) + .withMessageContaining("Error occurred after response was completed"); }); }