Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cli/__tests__/supervised-turn.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,10 @@ describe('the turn runner', () => {
expect(error.kind).toBe('stuck');
expect(ownGroup).toBe(process.platform !== 'win32');
expect(Number.isInteger(grandchild)).toBe(true);
const deadline = Date.now() + 2000;
// 5 s, not 2: the grandchild is detached and dies via the group signal, whose
// OS teardown a loaded CI host can take several seconds to finish after the kill
// lands — the kill is synchronous, the reap is not. The test timeout is 15 s.
const deadline = Date.now() + 5000;
while ((isRunning(child.pid) || isRunning(grandchild)) && Date.now() < deadline) {
// eslint-disable-next-line no-await-in-loop
await new Promise((r) => setTimeout(r, 20));
Expand Down
Loading