- // it('Verify that setWorkerChoiceStrategy() works with WEIGHTED_ROUND_ROBIN and dynamic pool', () => {
- // const workerChoiceStrategyContext = new WorkerChoiceStrategyContext(
- // dynamicPool
- // )
- // workerChoiceStrategyContext.setWorkerChoiceStrategy(
- // WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN
- // )
- // expect(workerChoiceStrategyContext.workerChoiceStrategy).toBeInstanceOf(
- // DynamicPoolWorkerChoiceStrategy
- // )
- // })
+ it('Verify that setWorkerChoiceStrategy() works with WEIGHTED_ROUND_ROBIN and dynamic pool', () => {
+ const workerChoiceStrategyContext = new WorkerChoiceStrategyContext(
+ dynamicPool
+ )
+ workerChoiceStrategyContext.setWorkerChoiceStrategy(
+ WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN
+ )
+ expect(
+ workerChoiceStrategyContext.getWorkerChoiceStrategy()
+ ).toBeInstanceOf(DynamicPoolWorkerChoiceStrategy)
+ expect(
+ workerChoiceStrategyContext.getWorkerChoiceStrategy().workerChoiceStrategy
+ ).toBeInstanceOf(WeightedRoundRobinWorkerChoiceStrategy)
+ })