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

index dd420c7f89b04f86792af87850d85dcbffe4f0d8..0d5832cd92a9edf5d249b854d58572769b66c65a 100644 (file)
@@ -432,7 +432,8 @@ describe('Selection strategies test suite', () => {
     )
     // TODO: Create a better test to cover `FairShareChoiceStrategy#choose`
     const promises = []
-    for (let i = 0; i < max * 2; i++) {
+    const maxMultiplier = 4
+    for (let i = 0; i < max * maxMultiplier; i++) {
       promises.push(pool.execute())
     }
     await Promise.all(promises)