From: Jérôme Benoit Date: Wed, 31 May 2023 12:51:08 +0000 (+0200) Subject: test: fix run X-Git-Tag: v2.5.0~4 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=f5d14e90554902505c45f251b247cc3b388bac28;p=poolifier.git test: fix run Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/abstract/abstract-pool.test.js b/tests/pools/abstract/abstract-pool.test.js index 1c014625..05abdc69 100644 --- a/tests/pools/abstract/abstract-pool.test.js +++ b/tests/pools/abstract/abstract-pool.test.js @@ -426,7 +426,7 @@ describe('Abstract pool test suite', () => { let poolFull = 0 pool.emitter.on(PoolEvents.full, () => ++poolFull) for (let i = 0; i < numberOfWorkers * 2; i++) { - promises.push(pool.execute()) + promises.add(pool.execute()) } await Promise.all(promises) // The `full` event is triggered when the number of submitted tasks at once reach the max number of workers in the dynamic pool. @@ -444,7 +444,7 @@ describe('Abstract pool test suite', () => { let poolBusy = 0 pool.emitter.on(PoolEvents.busy, () => ++poolBusy) for (let i = 0; i < numberOfWorkers * 2; i++) { - promises.push(pool.execute()) + promises.add(pool.execute()) } await Promise.all(promises) // The `busy` event is triggered when the number of submitted tasks at once reach the number of fixed pool workers.