X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fpools%2Fcluster%2Ffixed.test.mjs;h=ad7c003a97e675687b6ceb2df155cbc72a784591;hb=38e6b85b3247f847b61f30efc37851489f106e8a;hp=fa609cf357a8ac6763f2848c2102a5a47ffd6a0c;hpb=a621172f44c2cb0df392499f69dcbf869c269963;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() })