Merge branch 'master' of github.com:poolifier/poolifier
[poolifier.git] / tests / pools / thread / dynamic.test.js
index 1de664463edf589f50c0a46ed58bb159209a37fd..56847302653d1ee6df62a1a9bc44499ce8256b9b 100644 (file)
@@ -77,7 +77,7 @@ describe('Dynamic thread pool test suite', () => {
       './tests/worker-files/thread/testWorker.js'
     )
     const res = await pool1.execute()
-    expect(res).toBe(false)
+    expect(res).toStrictEqual({ ok: 1 })
     // We need to clean up the resources after our test
     await pool1.destroy()
   })
@@ -125,7 +125,7 @@ describe('Dynamic thread pool test suite', () => {
       longRunningPool.execute()
     }
     expect(longRunningPool.workerNodes.length).toBe(max)
-    await sleep(1500)
+    await sleep(1000)
     // Here we expect the workerNodes to be at the max size since the task is still executing
     expect(longRunningPool.workerNodes.length).toBe(max)
     // We need to clean up the resources after our test