test: refine expectation
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 18 Dec 2023 21:58:51 +0000 (22:58 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Mon, 18 Dec 2023 21:58:51 +0000 (22:58 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/pools/abstract-pool.test.mjs

index 59da4cd8907cb4e526a0cd8b044b2e01bc82787f..0f61dbd87d5e2911f9e1a648023ec1d6dade5005 100644 (file)
@@ -1304,7 +1304,7 @@ describe('Abstract pool test suite', () => {
     const elapsedTime = performance.now() - startTime
     expect(tasksFinished).toBe(numberOfWorkers * maxMultiplier)
     expect(elapsedTime).toBeGreaterThanOrEqual(2000)
-    expect(elapsedTime).toBeLessThanOrEqual(tasksFinishedTimeout)
+    expect(elapsedTime).toBeLessThanOrEqual(tasksFinishedTimeout + 100)
   })
 
   it('Verify that destroy() waits until the tasks finished timeout is reached', async () => {