-
Notifications
You must be signed in to change notification settings - Fork 590
streamer, tests: use the non-overlapping socket bind api #6895
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
base: master
Are you sure you want to change the base?
streamer, tests: use the non-overlapping socket bind api #6895
Conversation
@alexpyattaev or @apfitzge when you get a chance, can I have you take a look? |
It looks correct to me on skim, but it's a bit verbose to do this everywhere. Can we not have a |
I looked at the https://github.com/anza-xyz/agave/blob/master/net-utils/src/sockets.rs#L27-L45 and to me, the function does utilize the nextest env variable to coordinate the tests globally, there is also the atomic SLICE.. it looks like we could skip mutex in this case. Obviously, correct me if im wrong 🙏
To address the unnecessary verbosity, i introduced the helper function in Please tell me if that is the correct place for it and if so then how would you like to merge the changes to Thank you for the suggestion 🙏 i do appreciate a lot any constructive input. |
Please do not fix what is not broken =) |
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.
Let us not create mutable iterators where direct access would achieve the same result=)
@alexpyattaev thank you for pointing these out / fixed 🙏 |
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.
LGTM thank you!
Thank you! 🙏 |
ecf24b2
to
08d3893
Compare
This is currently blocked by #6957 |
Problem
A bunch of tests still relies on either hardcoded ports or bind_to_localhost and bind_to_unspecified. This creates flaky tests in cases where unique port ranges are needed.
Related to #6886
Summary of Changes
Swapped to the new localhost_port_range_for_tests.