Skip to content
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

Remove deprecated SocketUtils #28054

Closed
sbrannen opened this issue Feb 15, 2022 · 2 comments
Closed

Remove deprecated SocketUtils #28054

sbrannen opened this issue Feb 15, 2022 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

See:

@sbrannen sbrannen added the type: enhancement A general enhancement label Feb 15, 2022
@sbrannen sbrannen added this to the 6.0.0-M3 milestone Feb 15, 2022
@sbrannen sbrannen self-assigned this Feb 15, 2022
@sbrannen
Copy link
Member Author

Closed via 2cee634

sbrannen referenced this issue in sbrannen/spring-framework Feb 15, 2022
@sbrannen sbrannen added the in: core Issues in core modules (aop, beans, core, context, expression) label Feb 15, 2022
artembilan added a commit to artembilan/spring-integration that referenced this issue Feb 15, 2022
* Remove usage of non-stable `org.springframework.util.SocketUtils`
* Replace it with `0` for those tests where it is possible to select OS port
* Remove the mentioning of the `SocketUtils` from the `testing.adoc`
* Use `TransportConstants.DEFAULT_STOMP_PORT` for `StompServerIntegrationTests`.
We may disable this test in the future for CI if it is not going to be stable
* Introduce `Supplier<String> connectUrl` variants for `ZeroMqMessageHandler`
to let it defer connection evaluation until subscription to the socket `Mono`
in the `ZeroMqMessageHandler`.
* Move connection logic in the `ZeroMqMessageHandler` to `Lifecycle.start()`

Related to spring-projects/spring-framework#28054

**Cherry-pick to `5.4.x`**
garyrussell pushed a commit to spring-projects/spring-integration that referenced this issue Feb 16, 2022
* Remove usage of non-stable `org.springframework.util.SocketUtils`
* Replace it with `0` for those tests where it is possible to select OS port
* Remove the mentioning of the `SocketUtils` from the `testing.adoc`
* Use `TransportConstants.DEFAULT_STOMP_PORT` for `StompServerIntegrationTests`.
We may disable this test in the future for CI if it is not going to be stable
* Introduce `Supplier<String> connectUrl` variants for `ZeroMqMessageHandler`
to let it defer connection evaluation until subscription to the socket `Mono`
in the `ZeroMqMessageHandler`.
* Move connection logic in the `ZeroMqMessageHandler` to `Lifecycle.start()`

Related to spring-projects/spring-framework#28054

**Cherry-pick to `5.4.x`**
artembilan added a commit to spring-projects/spring-integration that referenced this issue Feb 16, 2022
* Remove usage of non-stable `org.springframework.util.SocketUtils`
* Replace it with `0` for those tests where it is possible to select OS port
* Remove the mentioning of the `SocketUtils` from the `testing.adoc`
* Use `TransportConstants.DEFAULT_STOMP_PORT` for `StompServerIntegrationTests`.
We may disable this test in the future for CI if it is not going to be stable
* Introduce `Supplier<String> connectUrl` variants for `ZeroMqMessageHandler`
to let it defer connection evaluation until subscription to the socket `Mono`
in the `ZeroMqMessageHandler`.
* Move connection logic in the `ZeroMqMessageHandler` to `Lifecycle.start()`

Related to spring-projects/spring-framework#28054

**Cherry-pick to `5.5.x`**

# Conflicts:
#	spring-integration-stomp/src/test/java/org/springframework/integration/stomp/client/StompServerIntegrationTests.java
@sbrannen
Copy link
Member Author

Please note that the team plans to introduce TestSocketUtils in Spring Framework 5.3.18. See #28210 for details.

sbrannen pushed a commit that referenced this issue Nov 14, 2022
SocketUtils was officially deprecated in 5.3.16 (gh-28052) and removed
in 6.0 M3 (gh-28054); however, there is still need for a subset of this
functionality in integration tests for testing scenarios in which it is
not possible for the system under test to select its own random port
(or rely on the operating system to provide an ephemeral port).

This commit therefore introduces a scaled down version in the
spring-test module called TestSocketUtils which supports retrieval of a
single TCP port.

See gh-29132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant