X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fthread%2Fdynamic.test.mjs;h=f7329710bd3c90e2264bebed7ab7aa628c0bccae;hb=903555377ec8775a7094d29f83e5287916c6e44f;hp=bf7f95278e861e0f1239d0ea36d0645399e56c3e;hpb=76efd044dab6a7b3e1fd2d336ada3b4672d1235b;p=poolifier.git diff --git a/tests/pools/thread/dynamic.test.mjs b/tests/pools/thread/dynamic.test.mjs index bf7f9527..f7329710 100644 --- a/tests/pools/thread/dynamic.test.mjs +++ b/tests/pools/thread/dynamic.test.mjs @@ -37,10 +37,10 @@ describe('Dynamic thread pool test suite', () => { expect(poolBusy).toBe(1) const numberOfExitEvents = await waitWorkerEvents(pool, 'exit', max - min) expect(numberOfExitEvents).toBe(max - min) + expect(pool.workerNodes.length).toBe(min) }) it('Verify scale thread up and down is working', async () => { - expect(pool.workerNodes.length).toBe(min) for (let i = 0; i < max * 2; i++) { pool.execute() } @@ -76,7 +76,7 @@ describe('Dynamic thread pool test suite', () => { it('Validation of inputs test', () => { expect(() => new DynamicThreadPool(min)).toThrow( - "Cannot find the worker file 'undefined'" + 'The worker file path must be specified' ) })