X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fcluster%2Fdynamic.test.mjs;h=540223bf2840ab384e11d4b077a5f84cd27a8144;hb=c1d4808dda55cd9ca2c7fdd5ccc330c3a7642a35;hp=d2a250c15b6b1032a6687634caa6cc905e115e00;hpb=8e8d9101768c28914dabc95c14740985e18f1f04;p=poolifier.git diff --git a/tests/pools/cluster/dynamic.test.mjs b/tests/pools/cluster/dynamic.test.mjs index d2a250c1..540223bf 100644 --- a/tests/pools/cluster/dynamic.test.mjs +++ b/tests/pools/cluster/dynamic.test.mjs @@ -157,15 +157,17 @@ describe('Dynamic cluster pool test suite', () => { await pool.destroy() }) - it.skip('Verify that a pool with zero worker works', async () => { - const pool = new DynamicClusterPool( - 0, - max, - './tests/worker-files/thread/testWorker.mjs' - ) - expect(pool.starting).toBe(false) + it('Verify that a pool with zero worker works', async () => { for (const workerChoiceStrategy of Object.values(WorkerChoiceStrategies)) { - pool.setWorkerChoiceStrategy(workerChoiceStrategy) + const pool = new DynamicClusterPool( + 0, + max, + './tests/worker-files/cluster/testWorker.cjs', + { + workerChoiceStrategy + } + ) + expect(pool.starting).toBe(false) expect(pool.readyEventEmitted).toBe(false) for (let run = 0; run < 2; run++) { run % 2 !== 0 && pool.enableTasksQueue(true) @@ -183,8 +185,8 @@ describe('Dynamic cluster pool test suite', () => { expect(pool.readyEventEmitted).toBe(false) expect(pool.workerNodes.length).toBe(pool.info.minSize) } + // We need to clean up the resources after our test + await pool.destroy() } - // We need to clean up the resources after our test - await pool.destroy() }) })