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
{{ message }}
Repository navigation
test: fake child processes can be signalled before they install their SIGTERM handler #282
The #265 flake came from a node -e fake that installs its SIGTERM handler only after Node starts up, while the test waited a fixed 100 ms. Under load, Node startup took 90 to 140 ms, so the fake died from the default SIGTERM action before it recorded anything. PR #281 fixed that one test with a ready file that the fake writes after it installs its handler.
Other tests also install SIGTERM handlers in fake child processes and may wait a fixed time or not at all. They were not audited:
packages/core/test/proc.test.ts
packages/desktop-linux/test/viewer.test.ts
packages/desktop-linux/test/integration.test.ts
packages/browser/test/devtools-mcp.test.ts
packages/cli/test/viewer-fakes.ts
packages/cli/test/browser-session.test.ts
packages/cli/test/browser-command-process.test.ts
packages/cli/test/watch.test.ts
A review of #281 also noted a pre-existing gap in packages/core/test/session.test.ts around lines 1016-1022: the pid === undefined check throws before the try, so if one spawn fails, the other fakes are not killed.
Audit each listed fake for signals sent before its handler exists
Use a readiness signal (ready file or stdout line) where a test depends on the handler
Move spawn checks inside the cleanup scope in session.test.ts
Activity