test: improve INTERLEAVED_WEIGHTED_ROUND_ROBIN strategy test
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 19 Aug 2023 16:13:05 +0000 (18:13 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 19 Aug 2023 16:13:05 +0000 (18:13 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
tests/pools/selection-strategies/selection-strategies.test.js

index 236d34efc8ca7fea74462c80892561f5dcb5cfe2..8f09c5024b28e78342c4c6af029156ebff3b80e3 100644 (file)
@@ -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(