- Notifications
You must be signed in to change notification settings - Fork923
fix: test: use monotonical port numbers#13999
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'm not sure this will fix the flake.
We're not "reserving" this port for use exclusively in this test.
There's no guarantee here that no other test is not already listening on this port.
To fix, we probably need to assign a "well-known" port to this test, and ensure that no other test can acquire it. We can assign a port outside of the ephemeral port range for this.
I assume that this should go together with skipping
Is there any specific method you have in mind? |
Yeah we can skip
You could just pick one like # on my Mac$ sysctl net.inet.ip.portrange.{first,last}net.inet.ip.portrange.first: 49152net.inet.ip.portrange.last: 65535# on a linux host$ ssh coder@greenhill.jnb.cdr.dev'sysctl net.ipv4.ip_local_port_range'net.ipv4.ip_local_port_range = 3276860999 Provided no other test explicitly uses port 30000, you should be ok. |
Closing in favor of#14000 |
Uh oh!
There was an error while loading.Please reload this page.
Related:#13931
This PR modifies the logic to assign a potentially empty part starting from the high boundary of the ephemeral range.
Note:
I don't guarantee it helps, but at least I couldn't reproduce it in CI.