fix(test): close task registry sqlite after reset

This commit is contained in:
Vincent Koc
2026-03-30 13:38:22 +09:00
parent c389b05d3c
commit b26092cf01

View File

@@ -1337,5 +1337,8 @@ export function resetTaskRegistryForTests(opts?: { persist?: boolean }) {
listenerStarted = false;
if (opts?.persist !== false) {
persistTaskRegistry();
// Close the sqlite handle after persisting the empty snapshot so Windows temp-dir
// cleanup can remove the state directory without hitting runs.sqlite EBUSY errors.
getTaskRegistryStore().close?.();
}
}