expect(workerChoiceStrategyContext.workerChoiceStrategy).toBeInstanceOf(
DynamicPoolWorkerChoiceStrategy
)
+ expect(
+ workerChoiceStrategyContext.workerChoiceStrategy.workerChoiceStrategy
+ ).toBeInstanceOf(RoundRobinWorkerChoiceStrategy)
})
it('Verify that setWorkerChoiceStrategy() works with LESS_RECENTLY_USED and fixed pool', () => {
expect(workerChoiceStrategyContext.workerChoiceStrategy).toBeInstanceOf(
DynamicPoolWorkerChoiceStrategy
)
+ expect(
+ workerChoiceStrategyContext.workerChoiceStrategy.workerChoiceStrategy
+ ).toBeInstanceOf(LessRecentlyUsedWorkerChoiceStrategy)
})
it('Verify that setWorkerChoiceStrategy() works with FAIR_SHARE and fixed pool', () => {
expect(workerChoiceStrategyContext.workerChoiceStrategy).toBeInstanceOf(
DynamicPoolWorkerChoiceStrategy
)
+ expect(
+ workerChoiceStrategyContext.workerChoiceStrategy.workerChoiceStrategy
+ ).toBeInstanceOf(FairShareWorkerChoiceStrategy)
})
it('Verify that setWorkerChoiceStrategy() works with WEIGHTED_ROUND_ROBIN and fixed pool', () => {
expect(workerChoiceStrategyContext.workerChoiceStrategy).toBeInstanceOf(
DynamicPoolWorkerChoiceStrategy
)
+ expect(
+ workerChoiceStrategyContext.workerChoiceStrategy.workerChoiceStrategy
+ ).toBeInstanceOf(WeightedRoundRobinWorkerChoiceStrategy)
})
})