X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fabstract%2Fabstract-pool.test.js;h=05abdc69d7c31369f42db85505531aa77022f9d3;hb=5a31b13c97c664f37f284960713e5261e6b04055;hp=1c0146252593604c5b74269c908a86674aae2f79;hpb=09c2d0d3bf72a566a9460155ef62b052e53411aa;p=poolifier.git 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.