EPIC: Test isolation
I maintainer di solito rispondono entro 1 giorno
@josecelano ci sta già lavorando.
Dal 30/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Goal
Every automated test is independent of every other test and of other test runs in the same environment (one host, one Docker daemon). Each test owns the resources it uses: network ports, container images and names, filesystem paths, and process-global state. A test result then depends only on the code under test.
The purpose is a robust test suite without flaky tests. Faster CI through parallel runs is a side benefit, not the goal. Isolation also improves the code: a component that works with an OS-assigned port must report the address it bound (observability), and a component that accepts injected paths and names instead of globals is easier to test (testability).
Why
- Flaky runs. The full nextest suite fails intermittently with
AddrInUsebecause fixtures release a selected port before using it or claim fixed ports inside the ephemeral range (reproduced locally; also seen in the #2298 container build). - Colliding E2E runs. The E2E runner publishes fixed host ports, so a second run on the same Docker host fails.
- Wrong results without a failure. CI tags each run's image with a fixed name, so two runs on one Docker host can test each other's image and still pass.
- Unknown shared resources. #2386 did not audit container names, networks, or
/tmppaths; process-global state has no inventory.
Already isolated: #1419 (main-app integration suites use port 0 and temporary workspaces), #2132 (native-process fixture discovers its port from the startup log), and the qBittorrent E2E runner (random Compose project names, Docker-assigned host ports).
Subissues
Linked as GitHub sub-issues, in delivery order:
- Eliminate parallel test port allocation races (bug)
- Audit shared test resources (task)
- Use dynamic host ports in the E2E runner (task)
- Use a unique tracker image tag per CI run (task)
- #1419 - Allow multiple integration tests at the main app level (existing; blocked on #1488)
Isolation rules
- A test owns every resource it uses and releases it on success, failure, and drop paths.
- Prefer OS-assigned ports (port
0) and read the bound address back from the service. - Never select a port by binding and releasing it before the service under test binds it.
- Give per-run names to shared-namespace resources: image tags, containers, networks, Compose projects, and paths.
- Do not change process-global state from a test that shares its process with other tests.
- When a test contract needs a fixed resource, document why; fixed ports must be outside the ephemeral range.
Out of scope
Production default ports; the shared Cargo target directory between runner instances (a speed concern); runner instances and self-hosted runner setup; cooperative shutdown (#1488).
Related EPIC: #1840 (PR workflow performance). Related, not parent: isolation enables running several jobs per self-hosted server, but this EPIC is driven by robustness.
The full specification is added to docs/issues/open/ by a spec-only pull request.
- Lingua principale
- Rust
- Stelle
- 532
- Fork
- 56
- Merge medio
- 11h 20m
- PR unite (30g)
- 282
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di torrust/torrust-tracker
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
torrust/torrust-tracker#3080 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
torrust/torrust-tracker#3069 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
torrust/torrust-tracker#3058 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
torrust/torrust-tracker#2978 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
torrust/torrust-tracker#2332 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di torrust/torrust-tracker
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
marketing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
difficulty: easy docs help wanted tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
-
bug help wanted ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
userFRM/egui-charts#4386 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
eliasstravik/herdr-projects#1605 · 1 commento ·