From 8ed871963831e2f1f15d24f13b2cba66516db15f Mon Sep 17 00:00:00 2001 From: hasezoey Date: Thu, 16 Nov 2023 17:49:20 +0100 Subject: [PATCH] test(lockfile): increase timeout --- .../src/util/__tests__/lockfile.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mongodb-memory-server-core/src/util/__tests__/lockfile.test.ts b/packages/mongodb-memory-server-core/src/util/__tests__/lockfile.test.ts index ff0f9ee5e..d719758c0 100644 --- a/packages/mongodb-memory-server-core/src/util/__tests__/lockfile.test.ts +++ b/packages/mongodb-memory-server-core/src/util/__tests__/lockfile.test.ts @@ -64,7 +64,8 @@ describe('LockFile', () => { expect(lockFile.LockFile.files.has(lockPath)).toBeTruthy(); // ensure that "lock2" gets executed as far as possible, which still may be inconsistent await new Promise(async (res) => { - setTimeout(res, 30); + // give some time for the lock promise to work, but return before it finished (because it never will) + setTimeout(res, 100); await lock2; }); // @ts-expect-error because "waitForLock" is protected