fix(tests): stop parallel tests colliding (release run 3309) #49

Merged
whitlocktech merged 1 commits from fix/live-shard-test-race into main 2026-11-27 22:13:59 -06:00

1 Commits

Author SHA1 Message Date
5322d0dd5c fix(tests): stop parallel tests colliding (release run 3309)
All checks were successful
PR Checks / rust-gates (pull_request) Successful in 1m49s
Release run 3309 went red on a_live_relative_launch_from_the_root_is_found_by_its_pid
(left 5085, right 5028). Three races between tests running in parallel, none in the
installer's behaviour:

- The live-launch test's `sh -c 'sleep 30; :'` forks to run sleep. Until it execs, the
  fork is a copy of sh with the same argv (naming ServUO.exe) and cwd - a genuine second
  match the scan could report first. The shell now waits in the `read` builtin on a stdin
  pipe the test holds, so it never forks.
- nothing_is_running_out_of_an_empty_tree could catch that child mid-exit (cmdline read,
  cwd gone) as an Unknown match. Both process-table tests now take a shared lock.
- TempDir named directories pid + nanoseconds and used create_dir_all, so two parallel
  tests with one prefix could share a directory and delete each other's files (the overlay
  tests' intermittent failures). A per-process counter now makes the name unique, and
  create_dir fails rather than sharing a directory that already exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t
2026-11-27 22:11:24 -06:00