From 9212fd4359159d9e015dc125376ca00cf2193b59 Mon Sep 17 00:00:00 2001 From: mesalogo Date: Wed, 7 Oct 2026 23:00:38 +0800 Subject: [PATCH] test: keep storage parity assertion deterministic --- src/main/desktop-storage.test.ts | 4 ++-- src/main/readonly-query-reader.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/desktop-storage.test.ts b/src/main/desktop-storage.test.ts index 249d0593..fc74916f 100644 --- a/src/main/desktop-storage.test.ts +++ b/src/main/desktop-storage.test.ts @@ -112,8 +112,8 @@ it('awaits a termination already in progress before close settles or capacity ca it('runs real utility-process storage, read workers, transactions, serialization, drain and reopen', async () => { const parent = resolve('temp/goodbuddy-storage-foundation') await mkdir(parent, { recursive: true }) - const directory = await mkdtemp(join(parent, 'electron-')) - await chmod(directory, 0o700) + const directory = await mkdtemp(join(parent, 'electron-')) + await chmod(directory, 0o700) try { const seed = new AssistantDatabase(join(directory, 'assistant.sqlite')) seed.initialize(directory) diff --git a/src/main/readonly-query-reader.test.ts b/src/main/readonly-query-reader.test.ts index 90ad09de..baf5c681 100644 --- a/src/main/readonly-query-reader.test.ts +++ b/src/main/readonly-query-reader.test.ts @@ -257,7 +257,7 @@ describe('assistant readonly worker', () => { await reader.terminateWorkerForTest() // A fast worker may commit the response before termination; the // dedicated crash tests cover rejection when failure wins the race. - await expect(inFlight).resolves.toEqual([expected[3]![0]]) + await expect(inFlight).resolves.toEqual(expected[1]) } finally { database.close() } }, 60_000)