test(tasks): close flow registry before temp dir cleanup

This commit is contained in:
Vincent Koc
2026-04-03 01:31:27 +09:00
parent bf1fcf2e5f
commit e4818a345e

View File

@@ -175,8 +175,9 @@ async function withTaskRegistryTempDir<T>(run: (root: string) => Promise<T>): Pr
try {
return await run(root);
} finally {
// Close the sqlite-backed registry before Windows temp-dir cleanup tries to remove it.
// Close both sqlite-backed registries before Windows temp-dir cleanup tries to remove them.
resetTaskRegistryForTests();
resetTaskFlowRegistryForTests();
}
});
}