rewrite: the CLOSE-during-mint test's yield poll can accuse the code, and its comment understates its coverage
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Lee crates/nostream-relay/src/testing.rs y la prueba a_close_during_the_invite_mint_leaves_the_event_but_not_the_read en crates/nostream-relay/tests/handlers.rs. Sustituye el bucle acotado de yield por una notificación de Tokio o una señal oneshot del doble de prueba cuando comience la creación del mint. El trabajo estará terminado cuando la prueba espere esa señal y siga verificando el comportamiento del mint en curso, sin un límite de iteraciones que dependa del planificador.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 829
- Forks
- 234
- Merge medio
- 17 h 6 min
- PR fusionados (30 d)
- 92
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cameri/nostream
-
factory rewrite rust
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
test: user-subscription specs fail outside UTC, so the pre-commit hook cannot passPosiblemente ocupada @tejasvasingh2004 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cameri/nostream#971 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug factory rewrite rust
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
cameri/nostream#960 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug factory rewrite rust
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
bug factory rewrite rust
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
Todos los issues de cameri/nostream
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
grafana/profiles-drilldown#1212 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
grafana/traces-drilldown#980 ·
Los mantenedores suelen responder en 1 día
-
Manager flashes an empty "errorOccurred" dialog while redirecting a logged-out user to loginAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
openremote/openremote#3487 · 1 comentario ·
-
triage:needs-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
garrytan/gbrain#7635 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
coollabsio/jean#867 ·
Los mantenedores suelen responder en 1 día