X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fcluster%2Ffixed.test.js;h=8234fab9a5f4f4e62b72f8ecdabd51b94f046c4d;hb=027c221543826da4df348775499148557d3d437e;hp=34c066100aff925579f80a8876c03a4b4d81e695;hpb=70a4f5ea122d3ddb2d2e0b245598ad241562e7f7;p=poolifier.git diff --git a/tests/pools/cluster/fixed.test.js b/tests/pools/cluster/fixed.test.js index 34c06610..8234fab9 100644 --- a/tests/pools/cluster/fixed.test.js +++ b/tests/pools/cluster/fixed.test.js @@ -137,6 +137,11 @@ describe('Fixed cluster pool test suite', () => { expect(inError).toBeDefined() expect(typeof inError === 'string').toBe(true) expect(inError).toBe('Error Message from ClusterWorker') + expect( + errorPool.workerNodes.some( + workerNode => workerNode.tasksUsage.error === 1 + ) + ).toBe(true) }) it('Verify that error handling is working properly:async', async () => { @@ -150,6 +155,11 @@ describe('Fixed cluster pool test suite', () => { expect(inError).toBeDefined() expect(typeof inError === 'string').toBe(true) expect(inError).toBe('Error Message from ClusterWorker:async') + expect( + asyncErrorPool.workerNodes.some( + workerNode => workerNode.tasksUsage.error === 1 + ) + ).toBe(true) }) it('Verify that async function is working properly', async () => {