Skip to content

Commit 8d6971e

Browse files
authored
fix(test): prevent SQLite worker teardown crashes (#114567)
1 parent 44bcaa2 commit 8d6971e

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎test/vitest-scoped-config.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,10 @@ describe("scoped vitest configs", () => {
613613
expectForkedIsolatedRunner(defaultInfraConfig);
614614
});
615615

616+
it("keeps native SQLite runtime config tests in forked workers", () => {
617+
expectForkedNonIsolatedRunner(defaultRuntimeConfig);
618+
});
619+
616620
it("keeps process, runtime config, and tooling lanes off the openclaw runtime setup", () => {
617621
expect(normalizeConfigPaths(requireTestConfig(defaultProcessConfig).setupFiles)).toEqual([
618622
"test/setup.ts",

‎test/vitest/vitest.runtime-config.config.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export function createRuntimeConfigVitestConfig(env?: Record<string, string | un
88
includeOpenClawRuntimeSetup: false,
99
name: "runtime-config",
1010
passWithNoTests: true,
11+
// Native SQLite handles can abort V8 when threaded workers tear down.
12+
// Forks keep database lifetimes inside a disposable process.
13+
pool: "forks",
1114
});
1215
return {
1316
...config,

0 commit comments

Comments
 (0)