Repository navigation
test(e2e): kill the login CLI directly instead of its process tree [RED-1142] [ship] - #1538
Merged
Merged
Conversation
…ED-1142] login.spec.ts stopped the hanging `pnpm checkly login` with `taskkill /F /T` on Windows. /T walks recorded parent PIDs, which Windows reuses, so it can also kill CLI runs of other test files in parallel workers. Those fail with exit code 1 and empty output, which matches the intermittent failures in checks-empty-account.spec.ts on Windows: in both observed runs the failing command ended exactly when login.spec.ts finished its last kill. Run the CLI entry point directly under node so the subprocess is the CLI process itself, and stop it with a plain kill on every platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sorccu
force-pushed
the
simo/red-1142-flaky-windows-e2e-empty-output
branch
from
October 16, 2026 14:05
47b719d to
9dd7b4f
Compare
sorccu
enabled auto-merge (squash)
October 16, 2026 14:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear: RED-1142
On Windows,
checks-empty-account.spec.tssometimes fails because onepnpm checkly checks …run exits with code 1 and prints nothing. This PR changes howlogin.spec.tsstops its hangingcheckly loginruns, which is the likely cause.Cause (inferred from timing)
login.spec.tsran in a parallel worker in that shard.login.spec.tsfinished its last test, within the precision of vitest's per-test timings.pnpm checkly loginwithtaskkill /F /T. A process killed this way exits with code 1 and no output./Tfinds child processes by their recorded parent PID, and Windows reuses PIDs. So it can kill processes that aren't children of the login run, including other tests' CLI runs.Change
runAndKillnow runs the CLI entry pointnode_modules/checkly/bin/run.cjsdirectly undernode, instead of throughpnpm checkly.subprocess.kill('SIGKILL')stops it on every platform.taskkill /Ton Windows and the detached process-group kill on POSIX.runAndKillno longer go through pnpm's bin shim. Every other e2e test still does.Verification
login.spec.tspasses 3/3 locally on macOS, and no CLI process is left behind.🤖 Generated with Claude Code