From 5afd97c2f61b3db61ebfe00ef9768ac1236b3d04 Mon Sep 17 00:00:00 2001 From: gnuxie Date: Mon, 11 Aug 2025 13:42:30 +0100 Subject: [PATCH] "Fix" a race condition with store disposal in fixtures. https://github.com/the-draupnir-project/Draupnir/issues/927. --- test/integration/fixtures.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/integration/fixtures.ts b/test/integration/fixtures.ts index a0550062..585c2d1a 100644 --- a/test/integration/fixtures.ts +++ b/test/integration/fixtures.ts @@ -60,6 +60,7 @@ async function cleanUpTopLevelStores(storagePath: string) { } }) ); + // } // When Draupnir starts (src/index.ts) it clobbers the config by resolving the management room @@ -106,6 +107,8 @@ export const mochaHooks = { await this.toggle?.stopEverything(); draupnirClient()?.stop(); this.stores?.dispose(); + // With regret, please see https://github.com/the-draupnir-project/Draupnir/issues/927. + await new Promise((resolve) => setTimeout(resolve, 50)); if (this.draupnir !== undefined) { await Promise.all([ this.draupnir.client.setAccountData(