Fix missed Promise.all usage in tests
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Oct 2022 23:10:10 +0000 (01:10 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 9 Oct 2022 23:10:10 +0000 (01:10 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
tests/pools/cluster/dynamic.test.js
tests/pools/thread/dynamic.test.js
tests/pools/thread/fixed.test.js

index 02a022870d4911eced33b2dd529ae695c7280210..61e1d6e2cd131bc8dabf95265854ec244bfdaa94 100644 (file)
@@ -26,7 +26,6 @@ describe('Dynamic cluster pool test suite', () => {
     for (let i = 0; i < max * 2; i++) {
       promises.push(pool.execute({ test: 'test' }))
     }
-    // await Promise.all(promises)
     expect(pool.workers.length).toBeLessThanOrEqual(max)
     expect(pool.workers.length).toBeGreaterThan(min)
     // The `busy` event is triggered when the number of submitted tasks at once reach the max number of workers in the dynamic pool.
index 8558cb6f16468f773df94edb3ff0fadb4b0877e3..94320429ce6d2cfa9deb956bcfac39f996ab26b9 100644 (file)
@@ -26,7 +26,6 @@ describe('Dynamic thread pool test suite', () => {
     for (let i = 0; i < max * 2; i++) {
       promises.push(pool.execute({ test: 'test' }))
     }
-    // await Promise.all(promises)
     expect(pool.workers.length).toBeLessThanOrEqual(max)
     expect(pool.workers.length).toBeGreaterThan(min)
     // The `busy` event is triggered when the number of submitted tasks at once reach the max number of workers in the dynamic pool.
index 9af4417c2fa5b61fcd130a00319adca7c3fe05ff..785c6e5d2d01c8801c0e34e1d33bc292bd543347 100644 (file)
@@ -74,7 +74,6 @@ describe('Fixed thread pool test suite', () => {
     for (let i = 0; i < numberOfThreads * 2; i++) {
       promises.push(pool.execute({ test: 'test' }))
     }
-    // await Promise.all(promises)
     // The `busy` event is triggered when the number of submitted tasks at once reach the number of fixed pool workers.
     // So in total numberOfThreads + 1 times for a loop submitting up to numberOfThreads * 2 tasks to the fixed pool.
     expect(poolBusy).toBe(numberOfThreads + 1)