fix(runner): force-kill worker that hangs on stop - #40637
Conversation
Adds a watchdog around the `__stop__` round-trip: if the child process does not exit within 5 minutes (overridable via PWTEST_CHILD_PROCESS_TIMEOUT for tests), it is force-killed using `taskkill /T /F` on Windows and SIGKILL elsewhere. Force-kill emits a new `processError` event that the dispatcher surfaces via reporter.onError so the run fails. Fixes microsoft#39753
Test results for "MCP"12 failed 6892 passed, 1052 skipped Merge workflow run. |
Test results for "tests 1"3 flaky41632 passed, 850 skipped Merge workflow run. |
Summary
__stop__: if the worker process does not exit within 5 min (overridable viaPWTEST_CHILD_PROCESS_TIMEOUTfor tests), it is force-killed (taskkill /T /Fon Windows, SIGKILL elsewhere).processErrorevent that the dispatcher reports viareporter.onError, so a hung worker fails the run.Fixes #39753