Repository navigation
test(mcpx): env cleanup waits for its daemons to actually exit - #16821
Conversation
mcpx stop returns once a daemon stops answering, but the process exits later — settle, cache save, pool drain — and under full-suite load that tail runs past the fixed grace callers allow, so daemons outlived their tests (#13481: pids still alive after cleanup in a full-suite run, while the sharded nightly passes the same test in 15.55s). newEnv's cleanup now snapshots the daemons recorded in the env's own state directory before stopping, and after stop --all and StopSupervisors it polls until every one of them is actually gone — process dead and socket refusing — bounded at 30s. A daemon past the bound is reported as a leak with its pid and the stop output, attributed to the owning test instead of being found hours later. Refs #13481
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
DiagnosisThe failure is a convergence gap, not a stop-path defect:
ChangeOne file, pkgs/mcpx/internal/e2e/e2e_test.go (the harness, which is what the guard test tests):
Every env in the suite gets the stronger cleanup, not just the guard test's env. TestEnvCleanupStopsTheDaemonItStarted stands as the regression test: it failed in the measured full-suite context and its post-cleanup checks now measure a cleanup that has already converged. Verification
(Lane 0647-L14R; PR created via the REST route because GraphQL createPullRequest is secondary-rate-limited fleet-wide right now.) |
Refs #13481 slice 3. Diagnosis, change and verification details are in the branch commit f071eae and will be mirrored here once created; full body follows in a comment. Verification: fleet-command run 46271829479 at exact head (guard test -count=5 -race -shuffle=on + TestStopAllShutsEverythingDown), pending the runner pool.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.