From: Jérôme Benoit Date: Sat, 24 Aug 2024 19:10:33 +0000 (+0200) Subject: test: optimize pool empty event test X-Git-Tag: v4.2.4~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=fa97876e2e8c5d8b507bc467bf8026f9a6573628;p=poolifier.git test: optimize pool empty event test Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/abstract-pool.test.mjs b/tests/pools/abstract-pool.test.mjs index 4499c3f7..f3e544ff 100644 --- a/tests/pools/abstract-pool.test.mjs +++ b/tests/pools/abstract-pool.test.mjs @@ -1296,7 +1296,7 @@ describe('Abstract pool test suite', () => { poolInfo = info }) expect(pool.emitter.eventNames()).toStrictEqual([PoolEvents.empty]) - for (let i = 0; i < numberOfWorkers * 2; i++) { + for (let i = 0; i < numberOfWorkers; i++) { promises.add(pool.execute()) } await Promise.all(promises)