"Fix" a race condition with store disposal in fixtures.

https://github.com/the-draupnir-project/Draupnir/issues/927.
This commit is contained in:
gnuxie
2025-08-11 13:42:30 +01:00
parent fe3cb2e94f
commit 5afd97c2f6
+3
View File
@@ -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(