Fix tests
This commit is contained in:
@@ -101,7 +101,7 @@ async function spawnParent(scenario: Scenario): Promise<{ parent: ReturnType<typ
|
||||
describe("reliability interactions: FN-5189 verification spawn supervision", () => {
|
||||
const spawnedParents = new Set<ReturnType<typeof spawn>>();
|
||||
|
||||
afterEach(() => {
|
||||
afterEach(async () => {
|
||||
for (const parent of spawnedParents) {
|
||||
if (parent.exitCode === null && parent.signalCode === null) {
|
||||
try {
|
||||
@@ -109,6 +109,13 @@ describe("reliability interactions: FN-5189 verification spawn supervision", ()
|
||||
} catch {
|
||||
// ignore cleanup failures
|
||||
}
|
||||
// Wait for the parent to fully exit so the subprocess guard
|
||||
// does not flag it as "left running" under concurrent load.
|
||||
try {
|
||||
await once(parent, "exit");
|
||||
} catch {
|
||||
// Already exited
|
||||
}
|
||||
}
|
||||
}
|
||||
spawnedParents.clear();
|
||||
|
||||
Reference in New Issue
Block a user