fix(FN-5168): harden db temp-dir cleanup
Fusion-Task-Id: FN-5168 Fusion-Task-Lineage: 0c865d3e-0886-4e51-a7ff-cb4c713dcc54
This commit is contained in:
committed by
gsxdsm
parent
dac2ebbbf3
commit
95707dc98f
@@ -69,6 +69,11 @@ function cleanupTmpDirsSync(): void {
|
||||
}
|
||||
}
|
||||
|
||||
// Full-suite worker shutdown can skip Vitest's normal afterAll timing if the worker
|
||||
// is already draining, so keep a process-level sync cleanup backstop for kb-db-test-*.
|
||||
process.once("beforeExit", cleanupTmpDirsSync);
|
||||
process.once("exit", cleanupTmpDirsSync);
|
||||
|
||||
afterAll(() => {
|
||||
cleanupTmpDirsSync();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user