Skip to content

Commit 97af092

Browse files
committed
tests: release the fixture dir once the backend child is gone
The two fixture cases of the loader suite remove their temporary tree right after killing server.js, and on Windows the still-running child holds that directory as its cwd, so rmSync answers EBUSY. Both finally blocks now await the exit promise the starter already exposes before removing the tree. Architecture and design by asdf80730. Implementation generated with AI assistance from omp (Qwen3.8-Flash-Next).
1 parent 5e37e83 commit 97af092

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎node/tests/loadServices.test.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ test('an ime.json without guid does not break a sibling service', async () => {
103103
assert.ok(b.alive());
104104
} finally {
105105
b.stop();
106+
// The child holds `root` as its cwd, so on Windows the directory unlocks
107+
// only once the process is gone.
108+
await b.exit();
106109
fs.rmSync(root, { recursive: true, force: true });
107110
}
108111
});
@@ -114,6 +117,7 @@ test('a tree where no config has a guid exits at startup', async () => {
114117
assert.strictEqual(await exitWithin(b, 5000), 1, 'no usable service left, so server.js must report it');
115118
} finally {
116119
b.stop();
120+
await b.exit();
117121
fs.rmSync(root, { recursive: true, force: true });
118122
}
119123
});

0 commit comments

Comments
 (0)