X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fthread%2Ffixed.test.js;h=aeebc4a7a623a1151f37f41aaf7f56ddcfcadbc1;hb=a1763c54c962c69b5e02a30c0909724986495fcd;hp=9ccbf67cfb38ab49a36a06bcc3974208925ca0e5;hpb=ef3891a3674f862e07006d0e1961feb12c41d1d8;p=poolifier.git diff --git a/tests/pools/thread/fixed.test.js b/tests/pools/thread/fixed.test.js index 9ccbf67c..aeebc4a7 100644 --- a/tests/pools/thread/fixed.test.js +++ b/tests/pools/thread/fixed.test.js @@ -111,6 +111,7 @@ describe('Fixed thread pool test suite', () => { } expect(promises.size).toBe(numberOfThreads * maxMultiplier) for (const workerNode of queuePool.workerNodes) { + expect(workerNode.usage.tasks.executing).toBeGreaterThanOrEqual(0) expect(workerNode.usage.tasks.executing).toBeLessThanOrEqual( queuePool.opts.tasksQueueOptions.concurrency ) @@ -133,6 +134,7 @@ describe('Fixed thread pool test suite', () => { numberOfThreads * (maxMultiplier - queuePool.opts.tasksQueueOptions.concurrency) ) + expect(queuePool.info.backPressure).toBe(false) await Promise.all(promises) for (const workerNode of queuePool.workerNodes) { expect(workerNode.usage.tasks.executing).toBe(0)