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 zero ports in tests #215

Closed
jmcph4 opened this issue Sep 29, 2023 · 0 comments · Fixed by #216
Closed

Use zero ports in tests #215

jmcph4 opened this issue Sep 29, 2023 · 0 comments · Fixed by #216
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jmcph4
Copy link
Member

jmcph4 commented Sep 29, 2023

Similarly to sigp/lighthouse#4704, some of our tests race on port number allocation. The main offenders are:

These both hardcode UDP ports (like 10001 and 10002). Locally, all it takes me is 3-4 runs of the test suite to induce failures due to AddrInUse. The specific failure case is always a panic when the port can't be allocated:

thread 'service::test::test_connection_direction_on_inject_session_established' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', src/service/test.rs:58:14
@jmcph4 jmcph4 added bug Something isn't working good first issue Good for newcomers labels Sep 29, 2023
@jmcph4 jmcph4 self-assigned this Sep 29, 2023
@jmcph4 jmcph4 mentioned this issue Sep 29, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant