X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fpools%2Fcluster%2Ffixed.test.mjs;h=ad7c003a97e675687b6ceb2df155cbc72a784591;hb=773881ea2c1b9aa8cd9698cc3ccc1978609ad98f;hp=fa609cf357a8ac6763f2848c2102a5a47ffd6a0c;hpb=96e265eb19e581dd0a73a788a9d641c9f13ce0cd;p=poolifier.git diff --git a/tests/pools/cluster/fixed.test.mjs b/tests/pools/cluster/fixed.test.mjs index fa609cf3..ad7c003a 100644 --- a/tests/pools/cluster/fixed.test.mjs +++ b/tests/pools/cluster/fixed.test.mjs @@ -68,7 +68,7 @@ describe('Fixed cluster pool test suite', () => { let result = await pool.execute({ function: TaskFunctions.fibonacci }) - expect(result).toBe(75025) + expect(result).toBe(354224848179262000000) result = await pool.execute({ function: TaskFunctions.factorial }) @@ -327,7 +327,8 @@ describe('Fixed cluster pool test suite', () => { await expect(pool.destroyWorkerNode(workerNodeKey)).resolves.toBeUndefined() expect(disconnectEvent).toBe(1) expect(exitEvent).toBe(1) - expect(pool.workerNodes.length).toBe(numberOfWorkers - 1) + // Simulates an illegitimate worker node destroy and the minimum number of worker nodes is guaranteed + expect(pool.workerNodes.length).toBe(numberOfWorkers) await pool.destroy() })