Skip to content

WebClientIntegrationTests are failing if port 80 is in use #28902

Closed
@vpavic

Description

@vpavic

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!
$ ./gradlew clean --no-build-cache :spring-webflux:test --tests "org.springframework.web.reactive.function.client.WebClientIntegrationTests"

> Task :spring-beans:compileTestFixturesJava
/home/vpavic/dev/projects/spring-projects/spring-framework/worktree-main/spring-core/build/classes/java/main/org/springframework/lang/Nullable.class: warning: Cannot find annotation method 'when()' in type 'Nonnull': class file for javax.annotation.Nonnull not found
warning: unknown enum constant When.MAYBE
  reason: class file for javax.annotation.meta.When not found
/home/vpavic/dev/projects/spring-projects/spring-framework/worktree-main/spring-core/build/classes/java/main/org/springframework/lang/NonNullApi.class: warning: Cannot find annotation method 'value()' in type 'TypeQualifierDefault': class file for javax.annotation.meta.TypeQualifierDefault not found
/home/vpavic/dev/projects/spring-projects/spring-framework/worktree-main/spring-core/build/classes/java/main/org/springframework/lang/NonNullFields.class: warning: Cannot find annotation method 'value()' in type 'TypeQualifierDefault'
4 warnings

> Task :spring-webflux:test

WebClientIntegrationTests > malformedResponseChunksOnBodilessEntity(ClientHttpConnector) > org.springframework.web.reactive.function.client.WebClientIntegrationTests.malformedResponseChunksOnBodilessEntity(ClientHttpConnector)[3] FAILED
    java.lang.AssertionError at MessageFormatter.java:115

WebClientIntegrationTests > malformedResponseChunksOnEntityWithBody(ClientHttpConnector) > org.springframework.web.reactive.function.client.WebClientIntegrationTests.malformedResponseChunksOnEntityWithBody(ClientHttpConnector)[3] FAILED
    java.lang.AssertionError at MessageFormatter.java:115

WebClientIntegrationTests > exchangeWithRelativeUrl(ClientHttpConnector) > org.springframework.web.reactive.function.client.WebClientIntegrationTests.exchangeWithRelativeUrl(ClientHttpConnector)[1] FAILED
    java.lang.AssertionError at MessageFormatter.java:115

WebClientIntegrationTests > exchangeWithRelativeUrl(ClientHttpConnector) > org.springframework.web.reactive.function.client.WebClientIntegrationTests.exchangeWithRelativeUrl(ClientHttpConnector)[2] FAILED
    java.lang.AssertionError at MessageFormatter.java:115

WebClientIntegrationTests > exchangeWithRelativeUrl(ClientHttpConnector) > org.springframework.web.reactive.function.client.WebClientIntegrationTests.exchangeWithRelativeUrl(ClientHttpConnector)[3] FAILED
    java.lang.AssertionError at MessageFormatter.java:115

WebClientIntegrationTests > exchangeWithRelativeUrl(ClientHttpConnector) > org.springframework.web.reactive.function.client.WebClientIntegrationTests.exchangeWithRelativeUrl(ClientHttpConnector)[4] FAILED
    java.lang.AssertionError at MessageFormatter.java:115

165 tests completed, 6 failed

> Task :spring-webflux:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':spring-webflux:test'.
> There were failing tests. See the report at: file:///home/vpavic/dev/projects/spring-projects/spring-framework/worktree-main/spring-webflux/build/reports/tests/test/index.html

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 21s
93 actionable tasks: 74 executed, 19 up-to-date

A build scan was not published as you have not authenticated with server 'ge.spring.io'.
$ systemctl stop nginx.service
$ nc -vz localhost 80
nc: connect to localhost (127.0.0.1) port 80 (tcp) failed: Connection refused
$ ./gradlew clean --no-build-cache :spring-webflux:test --tests "org.springframework.web.reactive.function.client.WebClientIntegrationTests"

> Task :spring-beans:compileTestFixturesJava
/home/vpavic/dev/projects/spring-projects/spring-framework/worktree-main/spring-core/build/classes/java/main/org/springframework/lang/Nullable.class: warning: Cannot find annotation method 'when()' in type 'Nonnull': class file for javax.annotation.Nonnull not found
warning: unknown enum constant When.MAYBE
  reason: class file for javax.annotation.meta.When not found
/home/vpavic/dev/projects/spring-projects/spring-framework/worktree-main/spring-core/build/classes/java/main/org/springframework/lang/NonNullApi.class: warning: Cannot find annotation method 'value()' in type 'TypeQualifierDefault': class file for javax.annotation.meta.TypeQualifierDefault not found
/home/vpavic/dev/projects/spring-projects/spring-framework/worktree-main/spring-core/build/classes/java/main/org/springframework/lang/NonNullFields.class: warning: Cannot find annotation method 'value()' in type 'TypeQualifierDefault'
4 warnings

BUILD SUCCESSFUL in 20s
93 actionable tasks: 74 executed, 19 up-to-date

A build scan was not published as you have not authenticated with server 'ge.spring.io'.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions