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
This commit is contained in:
Brian Clozel 2019-11-22 20:56:43 +01:00
parent 945ce2e6b9
commit 0c5bb60384
1 changed files with 2 additions and 3 deletions

View File

@ -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");
});
}