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

Use better method to find free port #7083

Draft
wants to merge 1 commit into
base: 1.8.x
Choose a base branch
from

Conversation

mdedetrich
Copy link
Contributor

@mdedetrich mdedetrich commented Dec 2, 2022

Rather than trying to find random open ports we instead should instead use this technique https://stackoverflow.com/a/2675416 to find free ports which will also work on Windows #7082.

@lightbend-cla-validator
Copy link

Hi @mdedetrich,

Thank you for your contribution! We really value the time you've taken to put this together.

We see that you have signed the Lightbend Contributors License Agreement before, however, the CLA has changed since you last signed it.
Please review the new CLA and sign it before we proceed with reviewing this pull request:

https://www.lightbend.com/contribute/cla

@mdedetrich mdedetrich force-pushed the use-proper-method-to-find-free-port branch 10 times, most recently from 07caa2f to fb308d3 Compare December 2, 2022 09:37
@mdedetrich
Copy link
Contributor Author

@eed3si9n So while this PR should theoretically solve the problem, I still cannot replicate the bug (using #7084 to try and replicate the original bug).

@mdedetrich mdedetrich force-pushed the use-proper-method-to-find-free-port branch from fb308d3 to 21ea9f4 Compare December 2, 2022 12:18
@@ -186,6 +186,7 @@ jobs:
shell: bash
run: |
# test building sbtn on Windows
sbt "commandProj/testOnly xsbt.IPCSpec"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to make sure the added test runs on Windows

@mdedetrich mdedetrich force-pushed the use-proper-method-to-find-free-port branch 4 times, most recently from d22853f to 9557d2f Compare December 7, 2022 13:33
@mdedetrich mdedetrich force-pushed the use-proper-method-to-find-free-port branch from 9557d2f to 62c1509 Compare December 7, 2022 13:34
@mdedetrich
Copy link
Contributor Author

Setting this to draft for now as I don't think its the actual reason behind sbt scripted tests failing on windows-latest CI but its still a useful change so I will work on it after #7087 is verified.

@mdedetrich mdedetrich marked this pull request as draft December 8, 2022 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants