Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

caseworkctl public_jwks test can fail when another test takes its port

Aperta Adatta ai principianti
#1,623 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

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
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
testing-qa

Direzione di ricerca

Inizia in crates/registry-caseworkctl/src/dev/public_jwks.rs, all'interno di dev::public_jwks::tests::serves_only_public_keys_and_releases_its_listener, e analizza come vengono gestiti la porta effimera e il controllo del rilascio. Esegui il test indicato con parallel cargo test. Il lavoro è completo quando l'asserzione sul rilascio non fallisce più perché un altro test occupa temporaneamente la porta selezionata, continuando comunque a verificare che il server rilasci il proprio listener.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:casework bug criticality:p3 triage:needs-implementation

dev::public_jwks::tests::serves_only_public_keys_and_releases_its_listener in crates/registry-caseworkctl/src/dev/public_jwks.rs failed once in the Rust workspace job on 2026-09-27, on a PR that changed no Rust code:

panicked at crates/registry-caseworkctl/src/dev/public_jwks.rs:159:21:
`Result::unwrap()` on an `Err` value: the explicit public JWKS port is occupied
caused by: Address already in use (os error 98)

A re-run passed.

Suspected cause (not reproduced; about 70% confident)

The test picks a port by binding 127.0.0.1:0 and dropping that listener, starts the server on the port, then after drop(server) calls probe(port) to prove the listener was released. Under parallel cargo test, another test can bind the same ephemeral port in either gap, so the release check fails even though the server did release it.

Fix direction

Test-only. Make the release assertion independent of other processes on the machine, for example by retrying the probe briefly, or by asserting on the server's own socket rather than on the port being free. The production code path is not implicated.

Lingua principale
Rust
Stelle
2
Fork
0
Merge medio
7h 46m
PR unite (30g)
199

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di registrystack/registry-stack

Tutte le issue di registrystack/registry-stack

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.