test: optimize pool empty event test
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 24 Aug 2024 19:10:33 +0000 (21:10 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sat, 24 Aug 2024 19:10:33 +0000 (21:10 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/pools/abstract-pool.test.mjs

index 4499c3f76233fc973c628fbbfb191b96d7a3c2bd..f3e544ff581927e7c15a8d362f175928ad54733c 100644 (file)
@@ -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)