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
Test/SocketUtils replacement #327
Comments
As a primary goal, let's 1st attempt to remove usage completely (eg use server.port=0 or testcontainers etc..) |
@onobc Hi, I'm trying to migrate to Spring Boot 3 and I have the same issue with some tests. Did you find a workaround to the lack of |
Hi @gilbertotcc , what I have done is reduce usage of TestSocketUtils by reworking how we were doing some of the integration tests. In some cases, just setting the server.port to 0 and then polling ourselves for the actual port being used, or in some cases using testcontainers instead. However, in some cases we still needed the TestSocketUtils and I did that evil thing - you know, copy/pasta TestSocketUtils to the repo where it is needed. I will remove that once it is available in spring-test. |
@onobc Thanks for the suggestions. I will try the same way (in the meanwhile). |
Most of the embedded services will allow providing port 0 and then after starting the port can be retrieved and assigned to client url. |
Fixes spring-cloud#327 - Delete local TSU temporary implementations - Replace local TSU w/ spring-test TSU
Fixes spring-cloud#327 - Delete local TSU temporary implementations - Replace local TSU w/ spring-test TSU
Fixes spring-cloud/stream-applications#327 - Delete local TSU temporary implementations - Replace local TSU w/ spring-test TSU
Test/SocketUtils has been removed in SF6.
I have submitted a proposal that adds a lightweight version of it in
spring-test
(here). However, this will not be available until after SF goes GA.In the meantime, I have copied it in all modules it was being used. We can leave as-is (which is pretty terrible) and then replace once the above PR is merged. OR is there something we can do now to reduce the duplication such as put the util in a common accessible package in this repo?
The text was updated successfully, but these errors were encountered: