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
Commit df4d3cd
Browse filesBrowse the repository at this point in the historyBrowse files
test(prepush): require reaper stamps and await stub teardown
The cleanup-deadline check now fails by name when the reaper wrote no stamp, the never-up row waits up to 5 s for its stub to exit, and the spawn-timeout row's stand-in execs sleep so its process keeps the row directory in its command line. The focus fixture's doc comment sits back above decide().
Copy file name to clipboardExpand all lines: tests/prepush_cap_smoke.test.ts
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -304,6 +304,10 @@ describe('the hard stop ends the legs of a real hook run', () => {
304
304
constrecorded=reaperRecord()
305
305
rmSync(dir,{recursive: true,force: true})
306
306
expect(reaperGone,`the cleanup process ${reaper} never exited`).toBe(true)
307
+
if(reaper>1&&reaperGone){
308
+
expect(gone,`the cleanup process ${reaper} wrote no "hook gone" stamp\n${recorded}`).not.toBeNull()
309
+
expect(exited,`the cleanup process ${reaper} wrote no "exit" stamp\n${recorded}`).not.toBeNull()
310
+
}
307
311
if(gone!==null&&exited!==null)expect(exited-gone,`the cleanup process outlived its deadline, past the end of the row\n${recorded}`).toBeLessThanOrEqual(REAP_GRACE_S)
308
312
// A row whose cleanup ended the runner shows up as a vitest run that exits 0 with no summary; this names the row instead, while the worker still lives to say so.
309
313
expect(runnerAlive(),`the vitest runner (pid ${process.ppid}) was ended during this row`).toBe(true)
@@ -378,9 +382,9 @@ describe('the hard stop ends the legs of a real hook run', () => {
expect(stubGone,`the slow cleanup process ${stub} outlived the hook`).toBe(true)
386
390
expect(r.timedOut,r.out).toBe(false)
@@ -392,7 +396,7 @@ describe('the hard stop ends the legs of a real hook run', () => {
392
396
// A hook still starting when the spawn timeout ends it leaves its tree behind; the row ends that tree, so the directory can be removed and nothing outlives the row.
393
397
hookRow('a hook the spawn timeout ended leaves no process holding its directory',()=>{
/** A sandbox repo with one recorded failing test, then the given files changed in a second commit. Returns the decision note and the focus list. */
114
113
// The caller's environment without the PREPUSH_ and TG_PREPUSH_ knobs (PREPUSH_FULL, the budgets, the elapsed seconds), so only what a test sets reaches the script.
// The sandbox is reached through a symlink, as every macOS temp directory is (/var points into /private): a script that mistakes a symlinked path for a different file does nothing here
0 commit comments