Browser plugin: a second Pest process deletes a running parallel run's playwright-server.json
Los mantenedores suelen responder en 5 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 66/100
Línea de trabajo
Start with Plugin::terminate(), ServerManager::instance()->playwright()->stop(), PlaywrightNpmServer::stop(), and AlreadyStartedPlaywrightServer::markAsStopped() and fromPersisted(). Trace when the server address is persisted and when another Pest process removes it; reproduce with a parallel browser run and a second Pest process. Done when the second process can exit without removing the running run's server file, and the parallel browser tests continue to pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Pest Version
5.1.1 (pest-plugin-browser 5.0.1)
PHP Version
8.4.23
Operation System
macOS
Description
When a parallel run (--parallel) is using the browser plugin, the parent process starts one Playwright server and writes its address to vendor/pestphp/pest-plugin-browser/.temp/playwright-server.json, which the workers read through AlreadyStartedPlaywrightServer::fromPersisted().
Plugin::terminate() calls ServerManager::instance()->playwright()->stop() in every non-worker process. That ends in PlaywrightNpmServer::stop(), which calls AlreadyStartedPlaywrightServer::markAsStopped() and unlinks the file unconditionally, even when the process never started a server.
So any other Pest process started in the same project while a parallel run is in progress deletes the file when it ends, and every remaining browser test of the parallel run fails with:
file_get_contents(.../vendor/pestphp/pest-plugin-browser/.temp/playwright-server.json): Failed to open stream: No such file or directory
This includes a second process that ends immediately without running any test, for example one that exits from the configured bootstrap file.
Steps to reproduce
- Run a suite with browser tests in parallel:
./vendor/bin/pest --parallel. - While it runs, run any other Pest command in the same project, for example
./vendor/bin/pest tests/Unit/ExampleTest.php. - Every browser test of the first run that starts after step 2 finishes fails with the error above.
Expected
markAsStopped() (or stop()) only removes the persisted file when this process started the server that wrote it, for example by keeping track of whether persist() was called in this process.
- Lenguaje dominante
- PHP
- Estrellas
- 11.8k
- Forks
- 559
- Merge medio
- 5 d 23 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Sin Dockerfile ni 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 pestphp/pest
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 5 días
-
[Bug]: --mutate hides unreadable files, so mutants behind a failed read can never be killedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 5 días
-
[Bug]: [mutate] Windows: @pest-mutate-ignore comments land on line 1 in files with LF line endingsPosiblemente ocupada @webdevsamran la tomó hace 57 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 5 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 5 días
-
[pest-plugin-browser] Page::waitForLoadState() never sends its message — waitForEvent() is a silent no-opPosiblemente ocupada @asllanmaciel la tomó hace 70 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
pestphp/pest#1892 · 2 comentarios ·
Los mantenedores suelen responder en 5 días
Todos los issues de pestphp/pest
Issues similares
-
Group 2 - Data Storage | Tripal DBX | Chado Group 5 - Search | ElasticSearch | Views Priority - Medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
nginx update required due to NGINX2RootPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
mailcow/mailcow-dockerized#7668 · 5 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
lara-zeus/spatie-translatable#80 ·
Los mantenedores suelen responder en 1 día
-
small
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
uiowa/uiowa#10296 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
asyncapi/modelina#2709 · 1 comentario ·
Los mantenedores suelen responder en 1 día