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
test_ent1117 wildcard port-probe test flakes with EADDRINUSE on CI #4445
tests/unit/test_ent1117_port_probe_bind_only.py::test_wildcard_probe_sees_a_bind_on_another_local_address fails intermittently in CI with OSError: [Errno 98] Address already in use.
The test binds a socket to (127.0.0.2, 0), takes the ephemeral port the kernel picked, and then binds 127.0.0.1 on that same port. The kernel only guarantees the port is free on the address that was asked (127.0.0.2), so the loopback bind fails whenever another socket on the runner already holds that port on 127.0.0.1. The same collision also makes the earlier is_port_available(port) is False assertion pass for the wrong reason (the 127.0.0.1 holder, not the held bind on the other address).
Seen twice in a row on #4443, whose tested tree was byte-identical to dev (the PR only moves the enterprise submodule pointer, which the unit job does not check out).
Fix
Pick a port that is free on 127.0.0.1 as well as held on the other address before asserting anything, retrying a bounded number of times.
Acceptance criteria
The test chooses a port whose 127.0.0.1 bind is confirmed free while the other-address bind is held
The test still fails when is_port_available binds 127.0.0.1 instead of the wildcard
Activity
fix(tests): pick a port free on loopback too in the wildcard port-pro…