Let two runs of the fixed-port metrics test share a machine
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Read tests/metrics/fixed_ports.rs and the random loopback helper added in #2393, then reproduce the collision by running the built test binary twice concurrently. Confirm the approach in the spec review, update the test and document why the ports remain fixed. Run 20 paired executions and confirm both runs pass.
Written by the indexing model from the issue text.
Description
Parent EPIC: #2392
Goal
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.
- Dominant language
- Rust
- Stars
- 532
- Forks
- 56
- Avg merge
- 11h 20m
- Merged PRs (30d)
- 282
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from torrust/torrust-tracker
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
torrust/torrust-tracker#3080 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
torrust/torrust-tracker#3069 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
torrust/torrust-tracker#3058 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
torrust/torrust-tracker#2978 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
torrust/torrust-tracker#2332 ·
Maintainers usually reply within 1 day
All issues in torrust/torrust-tracker
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
difficulty: easy docs help wanted tooling
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
-
bug help wanted ui
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
userFRM/egui-charts#4386 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
eliasstravik/herdr-projects#1605 · 1 comment ·