-
Notifications
You must be signed in to change notification settings - Fork 887
flake: test-go-macos: TestPortForward/UDP_OnePort: match deadline exceeded: context deadline exceeded #10979
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
Comments
related? TestPortForward/UDP_TwoPorts |
Pretty sure this is ye olde classic flake of the port you want to listen on not being free, but our logging is just bad. |
spikecurtis
added a commit
that referenced
this issue
Dec 11, 2023
Fixes #10979 Testing code that listens on a specific port has created a long battle with flakes. Previous attempts to deal with this include opening a listener on a port chosen by the OS, then closing the listener, noting the port and starting the test with that port. This still flakes, notably in macOS which has a proclivity to reuse ports quickly. Instead of fighting with the chaos that is an OS networking stack, this PR fakes the host networking in tests. I've taken a small step here, only faking out the Listen() calls that port-forward makes, but I think over time we should be transitioning all networking the CLI does to an abstract interface so we can fake it. This allows us to run in parallel without flakes and presents an opportunity to test error paths as well.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seen here: https://github.com/coder/coder/actions/runs/7058169983/job/19213216707?pr=10975
Full raw logs: see gist
The text was updated successfully, but these errors were encountered: