X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fthread%2Fdynamic.test.js;h=56847302653d1ee6df62a1a9bc44499ce8256b9b;hb=c2d2417cb80d8c14637fe6a19d58bcf5ce18ae98;hp=1de664463edf589f50c0a46ed58bb159209a37fd;hpb=bac873bd6581e5d5c0884bc520e9ec3c446509e6;p=poolifier.git diff --git a/tests/pools/thread/dynamic.test.js b/tests/pools/thread/dynamic.test.js index 1de66446..56847302 100644 --- a/tests/pools/thread/dynamic.test.js +++ b/tests/pools/thread/dynamic.test.js @@ -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