test(tasks): pass temp root into registry helper · openclaw/openclaw@ccdec2e
vincentkoc
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -432,7 +432,7 @@ function resetTaskRegistryMemoryForTest(opts?: { persist?: boolean }) {
|
432 | 432 | } |
433 | 433 | |
434 | 434 | async function withTaskRegistryTempDir<T>( |
435 | | -run: () => Promise<T>, |
| 435 | +run: (root: string) => Promise<T>, |
436 | 436 | options?: { durableStore?: boolean }, |
437 | 437 | ): Promise<T> { |
438 | 438 | return await withTempDir({ prefix: "openclaw-task-registry-" }, async (root) => { |
@@ -443,7 +443,7 @@ async function withTaskRegistryTempDir<T>(
|
443 | 443 | configureInMemoryTaskStoresForTests(); |
444 | 444 | } |
445 | 445 | try { |
446 | | -return await run(); |
| 446 | +return await run(root); |
447 | 447 | } finally { |
448 | 448 | // Close both sqlite-backed registries before Windows temp-dir cleanup tries to remove them. |
449 | 449 | resetTaskRegistryForTests({ persist: false }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。