rewrite: the CLOSE-during-mint test's yield poll can accuse the code, and its comment understates its coverage
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Leggi crates/nostream-relay/src/testing.rs e il test a_close_during_the_invite_mint_leaves_the_event_but_not_the_read in crates/nostream-relay/tests/handlers.rs. Sostituisci il ciclo yield limitato con una notifica Tokio o un segnale oneshot dal test double quando inizia la creazione del mint. Il lavoro è completato quando il test attende quel segnale e continua a verificare il comportamento del mint in corso, senza un limite di iterazioni dipendente dallo scheduler.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
a_close_during_the_invite_mint_leaves_the_event_but_not_the_read (crates/nostream-relay/tests/handlers.rs) waits for the spawned mint to reach its held await with
for _ in 0..100 {
if fixture.invites.creates_started() == 1 { break; }
tokio::task::yield_now().await;
}
assert_eq!(fixture.invites.creates_started(), 1, "the invite mint is in flight");
The loop is deterministic in the sense that matters — it cannot make the property pass late, because the property is asserted after the abort and the release is program-ordered, and a mint that never starts fails the assertion with a message rather than hanging. But a fixed iteration bound is a (small) flake source: on a loaded runner, 100 scheduler opportunities may not be enough for a spawned task to start, and the failure would look like the defect the test exists to catch.
What it needs
The test double already counts creates_started(); give it a notification as well — a tokio::sync::Notify or a oneshot fired when the mint first awaits — and await that instead of polling. Then the wait is on a state the code signals, not on the scheduler being generous.
Test support only (crates/nostream-relay/src/testing.rs), no production change. Same class as the abort observable #963's spec considered: the double should be able to say what it is doing rather than being sampled.
- Lingua principale
- TypeScript
- Stelle
- 829
- Fork
- 234
- Merge medio
- 17h 6m
- PR unite (30g)
- 92
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
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 cameri/nostream
-
factory rewrite rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
test: user-subscription specs fail outside UTC, so the pre-commit hook cannot passForse già presa @tejasvasingh2004 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cameri/nostream#971 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug factory rewrite rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cameri/nostream#960 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug factory rewrite rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
bug factory rewrite rust
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cameri/nostream
Issue simili
-
e2e-failure ready-to-code
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
devdotfast/whiteboard#1415 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area/sessions comp/desktop desktop/sessions P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
NousResearch/hermes-agent#145383 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement p2 setup
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
vercel/eve#5419 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno