From f43fb41bcebfa646c24f2f757fc23ecaf3fc8dd2 Mon Sep 17 00:00:00 2001 From: Frank Chen Date: Fri, 14 Jan 2022 20:20:18 +0800 Subject: [PATCH] Simplify debugging of Undertow transferTo issue This commit introduces a dedicated (disabled) transferToWithUndertow() test method to simplify debugging of transferTo issues with Undertow. See gh-25310 Closes gh-27908 --- .../reactive/function/MultipartIntegrationTests.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/MultipartIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/MultipartIntegrationTests.java index eff17588a57..4a76b157d37 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/MultipartIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/MultipartIntegrationTests.java @@ -23,6 +23,8 @@ import java.nio.file.Paths; import java.time.Duration; import java.util.Map; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; import reactor.core.scheduler.Schedulers; import reactor.test.StepVerifier; @@ -101,6 +103,16 @@ class MultipartIntegrationTests extends AbstractRouterFunctionIntegrationTests { // TODO Determine why Undertow fails: https://github.com/spring-projects/spring-framework/issues/25310 assumeFalse(httpServer instanceof UndertowHttpServer, "Undertow currently fails with transferTo"); + verifyTransferTo(httpServer); + } + + @Disabled("Unstable on Undertow,Use @RepeatedTest(100) for verify") + @Test + void transferToWithUndertow() throws Exception { + verifyTransferTo(new UndertowHttpServer()); + } + + private void verifyTransferTo(HttpServer httpServer) throws Exception { startServer(httpServer); Mono result = webClient