Skip to content

Commit

Permalink
Properly use Reactor Netty 2 in AbstractHttpHandlerIntegrationTests
Browse files Browse the repository at this point in the history
Closes gh-31095
  • Loading branch information
sdeleuze committed Aug 24, 2023
1 parent c564f27 commit 21613ea
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static Stream<Named<HttpServer>> httpServers() {
return Stream.of(
named("Jetty", new JettyHttpServer()),
named("Reactor Netty", new ReactorHttpServer()),
named("Reactor Netty 2", new ReactorHttpServer()),
named("Reactor Netty 2", new ReactorNetty2HttpServer()),
named("Tomcat", new TomcatHttpServer()),
named("Undertow", new UndertowHttpServer())
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer;
import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorNetty2HttpServer;
import org.springframework.web.testfixture.http.server.reactive.bootstrap.UndertowHttpServer;

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

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

startServer(httpServer);

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

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

startServer(httpServer);

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

verifyTransferTo(httpServer);
}
Expand Down Expand Up @@ -145,6 +154,9 @@ private void verifyTransferTo(HttpServer httpServer) throws Exception {

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

startServer(httpServer);

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

startServer(httpServer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests;
import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer;
import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorNetty2HttpServer;
import org.springframework.web.testfixture.http.server.reactive.bootstrap.UndertowHttpServer;

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

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

startServer(httpServer);

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

startServer(httpServer);

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

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

startServer(httpServer);

Mono<String> result = webClient
Expand Down

0 comments on commit 21613ea

Please sign in to comment.