Relationships
#3953 datastore_v3_replica_verify_test stall case flakes under the full integration run: restore.pid is read before the stub writes it
Opened by stack72 · 10/26/2026
What happened
Running all of integration/ (deno run test integration/) on main at 7a81344 failed one test: the case named for a restore that stalls past the deadline ending the check without a verdict (swamp-club#3935), in integration/datastore_v3_replica_verify_test.ts.
Error: NotFound: No such file or directory (os error 2): readfile /private/tmp/swamp-verify-stall-/restore.pid
The same file passes three runs in a row on its own.
Why
The test writes a stub litestream shell script that records its own pid into restore.pid and then execs sleep. verifyReplica runs with deadlineMs: 300. Under a loaded parallel run the deadline can fire and kill the stub before the shell has written the pid file, so the readTextFile of restore.pid that follows assertRejects throws NotFound.
Suggested fix
Wait for restore.pid to exist (waitFor from swamp-testing) before reading it, or treat a missing pid file as the restore having been killed before it started. Raising the deadline only narrows the window.
Found while verifying swamp-club#3951; unrelated to that change.
Open
No activity in this phase yet.
Sign in to post a ripple.