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
Let two runs of the fixed-port metrics test share a machine #2906
Two concurrent runs of the metrics-fixed-ports integration test on one machine both pass. The test keeps covering tracker listeners on fixed ports.
Background
The shared-resource audit (#2394, finding P2) found that tests/metrics/fixed_ports.rs starts the tracker with four listeners on fixed ports: 0.0.0.0:17091 and 17092 (HTTP), 17093 and 17094 (UDP). Within one suite run nothing else uses them, but a second run of the same test binary on the same machine binds the same addresses, and its tracker fails to start with AddrInUse.
Running the built test binary twice at the same time, 20 times, failed one of the two runs in every pair. This happens today on development machines where several AI agents run the suite on the host network. On the self-hosted runner the test runs inside docker build, where each build step has its own network namespace, so concurrent builds do not collide.
Candidate approach (to confirm in spec review)
Bind the four fixed ports on a random loopback address from torrust_tracker_test_helpers::random::loopback_ipv4() (added in #2393) instead of 0.0.0.0, so two runs use different addresses with the same ports; ignore the test off Linux. This extends the helper beyond the nine #2393 tests, which needs a maintainer decision in the EPIC. Another option is deleting the test if metrics-port-zero already covers the same contract.
Tasks
Reproduce the paired-run collision on current develop.
Change the test so concurrent runs do not collide, and document why the ports are fixed.
Recheck with 20 paired runs.
The full specification is added to docs/issues/open/ by a spec-only pull request.
Activity
docs(issues): [torrust#2392] add issue specifications for torrust#2906,
docs(issues): [torrust#2392] add orders 6 to 8, close AC4 and extend t…
docs(issues): [torrust#2392] keep the torrust#2906 approach and torru…
docs(issues): [torrust#2392] refresh the torrust#2394 records and evi…
docs(issues): [torrust#2392] describe the torrust#2906 candidate appr…
Merge #2910: docs(issues): [#2392] add the #2394 audit's new issues a…