From b414b84cc22efd9df5d9b7c5a470125955cd0f1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 18 Aug 2023 20:48:14 +0200 Subject: [PATCH] test: improve multiple task functions worker usage test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- tests/pools/abstract/abstract-pool.test.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/pools/abstract/abstract-pool.test.js b/tests/pools/abstract/abstract-pool.test.js index 58d221ab..0929adc3 100644 --- a/tests/pools/abstract/abstract-pool.test.js +++ b/tests/pools/abstract/abstract-pool.test.js @@ -915,8 +915,15 @@ describe('Abstract pool test suite', () => { expect(result3).toBe(55) expect(pool.info.executingTasks).toBe(0) expect(pool.info.executedTasks).toBe(4) - for (const name of pool.listTaskFunctions()) { - for (const workerNode of pool.workerNodes) { + for (const workerNode of pool.workerNodes) { + expect(workerNode.info.taskFunctions).toStrictEqual([ + 'default', + 'jsonIntegerSerialization', + 'factorial', + 'fibonacci' + ]) + expect(workerNode.taskFunctionsUsage.size).toBe(3) + for (const name of pool.listTaskFunctions()) { expect(workerNode.getTaskFunctionWorkerUsage(name)).toStrictEqual({ tasks: { executed: expect.any(Number), -- 2.34.1