From d93793d8d08b2326a2ee01ceb1e391db1fdd0c11 Mon Sep 17 00:00:00 2001 From: "jakub.jedlikowski" Date: Mon, 30 Sep 2024 13:41:06 +0200 Subject: [PATCH] chore: increase duration of long-running task in test --- test/fn.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/fn.spec.ts b/test/fn.spec.ts index ee9983546..30d20ca43 100644 --- a/test/fn.spec.ts +++ b/test/fn.spec.ts @@ -112,12 +112,12 @@ test('subsequent executions after timeout', async () => { const syncFn = createSyncFn(workerCjsPath) // start an execution in worker that will definitely time out - expect(() => syncFn(1, SYNCKIT_TIMEOUT * 2)).toThrow( + expect(() => syncFn(1, SYNCKIT_TIMEOUT * 3)).toThrow( 'Internal error: Atomics.wait() failed: timed-out', ) // wait for timed out execution to finish inside worker - await new Promise(resolve => setTimeout(resolve, SYNCKIT_TIMEOUT * 2)) + await new Promise(resolve => setTimeout(resolve, SYNCKIT_TIMEOUT * 3)) // subsequent executions should work correctly expect(syncFn(2, 1)).toBe(2)