test: test: fix FAIR_SHARE strategy in dynamic pool (take 2)
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 3 Apr 2023 22:17:19 +0000 (00:17 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 3 Apr 2023 22:17:19 +0000 (00:17 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
tests/pools/selection-strategies/selection-strategies.test.js

index 0d5832cd92a9edf5d249b854d58572769b66c65a..5d5ecc9b289336d252df5603679d0a9a258c5cc6 100644 (file)
@@ -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())
     }