Browser plugin: a second Pest process deletes a running parallel run's playwright-server.json
I maintainer di solito rispondono entro 5 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- PHP
- Stelle
- 11.8k
- Fork
- 559
- Merge medio
- 5g 23h
- PR unite (30g)
- 24
Preparare l'ambiente
- Nessun Dockerfile né 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 pestphp/pest
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: --mutate hides unreadable files, so mutants behind a failed read can never be killedForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 5 giorni
-
[Bug]: [mutate] Windows: @pest-mutate-ignore comments land on line 1 in files with LF line endingsForse già presa @webdevsamran l’ha presa 57 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 5 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 5 giorni
-
[pest-plugin-browser] Page::waitForLoadState() never sends its message — waitForEvent() is a silent no-opForse già presa @asllanmaciel l’ha presa 70 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
pestphp/pest#1892 · 2 commenti ·
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di pestphp/pest
Issue simili
-
nginx update required due to NGINX2RootForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
mailcow/mailcow-dockerized#7668 · 5 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
lara-zeus/spatie-translatable#80 ·
I maintainer di solito rispondono entro 1 giorno
-
small
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
uiowa/uiowa#10296 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
asyncapi/modelina#2709 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
My-Little-Forum/mylittleforum#937 ·