File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1818### 3. ✅ Process Hanging After Tests Complete (FIXED)
1919** Problem** : Process doesn't exit after all tests pass, hangs indefinitely
2020- ** Root Cause** : Playwright's internal event loops keep the process alive even after cleanup
21- - ** File** : ` lib/helper/Playwright.js ` ` _cleanup() ` method
22- - ** Fix** : Add delayed auto-exit (2 seconds) after cleanup completes
21+ - ** File** : ` lib/helper/Playwright.js ` ` _afterSuite() ` and ` _cleanup() ` methods
22+ - ** Fix** : Add forced auto-exit (2 seconds) after cleanup completes
2323- ** Details** :
24- - Uses ` setTimeout().unref() ` to allow natural exit if possible
25- - Only exits if no other exit handlers are registered
26- - Respects existing ` process.exitCode `
24+ - Uses ` setTimeout().unref() ` with forced ` process. exit() `
25+ - Unconditionally exits after delay (removed listenerCount check)
26+ - Respects existing ` process.exitCode ` (0 for success, non-zero for failures)
2727 - Can be disabled with ` CODECEPT_DISABLE_AUTO_EXIT=1 ` environment variable
28- - ** Impact** : Tests now exit cleanly within 2 seconds after completion
28+ - ** Testing** : Verified locally - process exits in ~ 9s (6s test + 2s delay + overhead) instead of hanging indefinitely
29+ - ** Impact** : Tests now exit cleanly within 2 seconds after completion in all modes
2930
3031### 4. ⚠️ Per-Test Config with Session Mode + Workers (LIMITATION DOCUMENTED)
3132** Problem** : Per-test ` .config() ` doesn't work in BROWSER_RESTART=session mode with workers
You can’t perform that action at this time.
0 commit comments