From: Jérôme Benoit Date: Sat, 19 Aug 2023 16:13:05 +0000 (+0200) Subject: test: improve INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy test X-Git-Tag: v2.6.31~23 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e43b8c2da8ab98ffe61424613f5df7f8ae528986;p=poolifier.git test: improve INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy test Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/selection-strategies/selection-strategies.test.js b/tests/pools/selection-strategies/selection-strategies.test.js index 236d34ef..8f09c502 100644 --- a/tests/pools/selection-strategies/selection-strategies.test.js +++ b/tests/pools/selection-strategies/selection-strategies.test.js @@ -1838,6 +1838,10 @@ describe('Selection strategies test suite', () => { } } }) + expect(workerNode.usage.tasks.executed).toBeGreaterThanOrEqual(0) + expect(workerNode.usage.tasks.executed).toBeLessThanOrEqual( + max * maxMultiplier + ) } expect( pool.workerChoiceStrategyContext.workerChoiceStrategies.get(