You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
a_connection_error_is_retried can fail when the tests run in parallel #183
crates/hodeishield-api/tests/api.rs, a_connection_error_is_retried: the test binds a listener on 127.0.0.1:0, reads the port, drops the listener and then expects every connection to that port to be refused. Another test running in parallel (mockito servers bind ephemeral ports) can take the same port in between, so the client connects, gets an answer and the test fails (retries is not 2). Seen once in a local cargo test --workspace; it passes when run alone.
Acceptance criteria
The test no longer depends on a port staying free: for example, keep a listener that accepts and immediately closes connections, or point the client at an address that refuses connections without racing other tests.
50 consecutive runs of the hodeishield-api tests in parallel pass.
Fixed in 0.5.0 (#187): the listener stays bound for the whole test, so no other test can take its port. Before merging, 50 consecutive runs of the hodeishield-api tests in parallel passed with no failure.
Activity
d0ubl3g commentedon Oct 15, 2026
Fixed in 0.5.0 (#187): the listener stays bound for the whole test, so no other test can take its port. Before merging, 50 consecutive runs of the hodeishield-api tests in parallel passed with no failure.