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

Fixes #11668 - WebSocketOverHTTP2Test.testWebSocketConnectPortDoesNotExist() is flaky #11832

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented May 22, 2024

Sometimes it happens that some process is listening to connector.getLocalPort() + 1, making this test fail.

Now using a non-allocated privileged port from IANA, that nobody should listen to, so the test should not fail. It is not a 100% guarantee, but perhaps better than before, especially because now a port < 1024 is used.

…LocalPort() + 1`, making this test fail.

Now using a non-allocated privileged port from IANA, that nobody should listen to, so the test should not fail.
It is not a 100% guarantee, but perhaps better than before, especially because now a port < 1024 is used.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet sbordet requested review from gregw and lorban May 22, 2024 15:19
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

This is slightly better than +1. But there are lots of unassigned ports... perhaps we should iterate through them, trying to connect with a socket first to check it really isn't assigned... but happy for this to be committed in the meanwhile.

@sbordet sbordet merged commit be7491e into jetty-12.0.x May 23, 2024
7 of 9 checks passed
@sbordet sbordet deleted the fix/jetty-12.0.x/11668/flaky-testWebSocketConnectPortDoesNotExist branch May 23, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

WebSocketOverHTTP2Test.testWebSocketConnectPortDoesNotExist() is flaky
3 participants