Flake: a_refused_connection_is_not_retried races other tests for its freed port
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
- 76/100
Línea de trabajo
Empieza por crates/socket-patch-core/tests/api_retry_e2e.rs, especialmente por a_refused_connection_is_not_retried y la configuración del listener descrita en el issue. Comprueba cómo puede el test mantener un socket enlazado que no esté escuchando durante sus aserciones y, después, ejecuta este test de integración. Se considerará terminado cuando el puerto siga sin estar disponible para los tests en paralelo y la aserción siga exigiendo ApiError::Network.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
[agent] Found while handling a merge-queue eviction of #2405 (a test-only change in the CLI crate that does not touch this code).
Problem
a_refused_connection_is_not_retried in crates/socket-patch-core/tests/api_retry_e2e.rs picks its "dead" port by binding 127.0.0.1:0, reading the port and dropping the listener. Tokio tests in the same binary run in parallel and start their own stand-in servers on 127.0.0.1:0, so one of them can be handed the port just freed. The request then reaches a live server instead of being refused.
Evidence
Merge-queue CI run 46744428179, job coverage (1):
thread 'a_refused_connection_is_not_retried' panicked at crates/socket-patch-core/tests/api_retry_e2e.rs:983:5:
Other("API request failed with status 404: 127.0.0.1:36553 did not answer like the Socket patch API — check --api-url / SOCKET_API_URL and the organization slug 'org' (--org / SOCKET_ORG_SLUG)")
test result: FAILED. 17 passed; 1 failed
Something answered 404 on the port the test expected to be closed. ci-ok failed on that job alone and the queue entry was evicted.
Suggested fix
Keep the port reserved and still refusing for the length of the test, so no other test can take it. One way: bind a socket to the port without calling listen and hold it until the assertions finish (a connect to a bound, non-listening TCP socket is refused on Linux, macOS and Windows). Don't loosen the assertion on ApiError::Network.
Generated by Claude Code
- Lenguaje dominante
- Rust
- Estrellas
- 9
- Forks
- 2
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 213
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 SocketDev/socket-patch
-
agent:triaged arch-audit bug priority:p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SocketDev/socket-patch#2517 ·
Los mantenedores suelen responder en 1 día
-
agent:triaged bug bughunt pm:bundler priority:p1 ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SocketDev/socket-patch#2508 ·
Los mantenedores suelen responder en 1 día
-
agent:triaged bug bughunt pm:npm priority:p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
SocketDev/socket-patch#2476 ·
Los mantenedores suelen responder en 1 día
-
agent:triaged arch-audit priority:p3 refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
SocketDev/socket-patch#2429 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
agent:triaged arch-audit priority:p3 refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SocketDev/socket-patch#2419 ·
Los mantenedores suelen responder en 1 día
Todos los issues de SocketDev/socket-patch
Issues similares
-
chat compiler P1
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
HerringtonDarkholme/hd-lang#2793 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
security-advisory
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MinBZK/regelrecht#2173 ·
-
ci
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
jonathanong/no-mistakes#5804 ·
-
triage: failed
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
oxc-project/tsrs#1277 · 1 comentario ·
Los mantenedores suelen responder en 1 día