From: Jérôme Benoit Date: Mon, 3 Apr 2023 22:17:19 +0000 (+0200) Subject: test: test: fix FAIR_SHARE strategy in dynamic pool (take 2) X-Git-Tag: v2.4.0-3~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a909240d460f1f9c5d8ba12e1256874d25b84fc3;p=poolifier.git test: test: fix FAIR_SHARE strategy in dynamic pool (take 2) 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 0d5832cd..5d5ecc9b 100644 --- a/tests/pools/selection-strategies/selection-strategies.test.js +++ b/tests/pools/selection-strategies/selection-strategies.test.js @@ -432,7 +432,7 @@ describe('Selection strategies test suite', () => { ) // TODO: Create a better test to cover `FairShareChoiceStrategy#choose` const promises = [] - const maxMultiplier = 4 + const maxMultiplier = 8 for (let i = 0; i < max * maxMultiplier; i++) { promises.push(pool.execute()) } @@ -592,7 +592,7 @@ describe('Selection strategies test suite', () => { const promises = [] const maxMultiplier = pool.workerChoiceStrategyContext.workerChoiceStrategy.workerChoiceStrategy - .defaultWorkerWeight + .defaultWorkerWeight * 2 for (let i = 0; i < max * maxMultiplier; i++) { promises.push(pool.execute()) }