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
Replace usage of recently removed SocketUtils #825
Comments
About 80% through the changes w/o the need for SocketUtils so far. I do see a couple of places I may need it though. |
Was the referenced possible |
Hi @chrylis - it exists in the associated PR. However, the intention is to remove it ASAP in favor of a more centrally available one (such as the one in spring-cloud-test-support. Also, the one in the PR will not be published or usable outside of the SCF repo. |
Main fails to compile as SocketUtils has been deprecated->removed from the Spring Framework.
Temporary Workaround:
I took a very slimmed down version of
org.springframework.util.SocketUtils
and dropped it underspring-cloud-function-core
. It only exposes thefindAvailableTcpPort
as that is all that the tests are using.Suggested Alternative
Instead user port
0
and rely on the OS to assign a port to the server and then query the server for the port it is running on.Options
Option 1: Replace all usages of SocketUtils w/ the suggested alternative.
Option 2: Create a TestSocketUtils and put in shared test lib
I have started a team discussion and will let that drive the chosen option. In the meantime I will replace as many usages as possible.
cc: @olegz
The text was updated successfully, but these errors were encountered: