You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mdmundo Thank you for the repro, illustrates the question nicely!
The difference between the two fixtures is that browser is a worker-scoped fixture, while chromium is a test-scoped fixture.
So, when using the browser fixture:
Test successfully finishes.
Test-scoped fixtures are successfully teared down.
Playwright initiates worker termination, which includes tearing down the browser fixture.
Playwright ensures a 30 seconds maximum limit on the worker teardown, and kills the worker process after that. The browser is forcefully closed. Note there is a similar issue [Bug]: Worker-scoped fixture execution terminates before timeout #30504 that advocates for a customizable timeout for worker fixture teardown.
When using the chromium fixture:
Test successfully finishes.
Teardown for test-scoped fixtures is initiated, which includes tearing down the chromium fixture.
Since chromium never finishes, Playwright does not consider the test to be finished. Given that you set timeout: 0 in the config, Playwright waits indefinitely for the test to finish.
Given the above, it seems like things work as intended. Let me know what you think.
Version
1.44.0
Steps to reproduce
yarn -E --no-lockfile
yarn playwright install chromium
yarn playwright test
Expected behavior
Both browser windows are kept opened until you close them
Actual behavior
The one that is using the overridden browser fixture closes after ~30s
Additional context
Both fixtures share the following code:
expect.toPass
should prevent the browser from closing after being used in test, but it does not work if you are using the overridden browser fixture.Environment
The text was updated successfully, but these errors were encountered: