Let two runs of the fixed-port metrics test share a machine
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Rust
- 星标
- 532
- 派生
- 56
- 平均合并
- 11 小时 20 分钟
- 30 天内合并 PR
- 282
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
torrust/torrust-tracker 的其他 Issue
-
Bug
难度 2/5 1-3 小时 新手友好度 78/100
torrust/torrust-tracker#3080 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
torrust/torrust-tracker#3069 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
torrust/torrust-tracker#3058 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
torrust/torrust-tracker#2978 ·
维护者通常 1 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 73/100
torrust/torrust-tracker#2332 ·
维护者通常 1 天内回复
查看 torrust/torrust-tracker 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
marketing
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
difficulty: easy docs help wanted tooling
难度 2/5 1-3 小时 新手友好度 83/100
-
bug help wanted ui
难度 2/5 1-3 小时 新手友好度 85/100
userFRM/egui-charts#4386 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
eliasstravik/herdr-projects#1605 · 1 条评论 ·