-
Notifications
You must be signed in to change notification settings - Fork 38.5k
WebClientIntegrationTests are failing if port 80 is in use #28902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What happens if you add the following to try {
this.server.start(0);
}
catch (IOException ex) {
throw new UncheckedIOException(ex);
} |
The outcome is the same. Just to make sure I understood correctly what you meant, this is what I did locally: $ git diff
diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java
index 80e068a474..488a38b0d0 100644
--- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java
+++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java
@@ -116,6 +116,12 @@ class WebClientIntegrationTests {
private void startServer(ClientHttpConnector connector) {
this.server = new MockWebServer();
+ try {
+ this.server.start(0);
+ }
+ catch (IOException ex) {
+ throw new UncheckedIOException(ex);
+ }
this.webClient = WebClient
.builder()
.clientConnector(connector) |
OK. Thanks for trying it out.
Yes, that's what I meant. I hoped it would use an ephemeral port other than 80, but it was admittedly a shot in the dark since I don't really have time to investigate it at the moment. Maybe you or somebody else from the Framework team can look into it. |
I had a quick look and to me this doesn't look like an issue with the mock server. Failures in Regarding the other two failures, they look Jetty specific. |
FYI the Jetty flaky tests have been fixed via #29862. |
Several tests from
WebClientIntegrationTests
are failing for me locally when port 80 is in use. To reproduce this ensure the build is not pulling results from the cache.$ nc -vz localhost 80 Connection to localhost (127.0.0.1) 80 port [tcp/http] succeeded!
The text was updated successfully, but these errors were encountered: