)
expect(() => workerChoiceStrategyContext.execute()).toThrow(
new Error(
- `Worker node key chosen is null or undefined after ${fixedPool.info.maxSize} retries`
+ `Worker node key chosen is null or undefined after ${
+ fixedPool.info.maxSize +
+ Object.keys(workerChoiceStrategyContext.opts.weights).length
+ } retries`
)
)
const workerChoiceStrategyNullStub = createStubInstance(
)
expect(() => workerChoiceStrategyContext.execute()).toThrow(
new Error(
- `Worker node key chosen is null or undefined after ${fixedPool.info.maxSize} retries`
+ `Worker node key chosen is null or undefined after ${
+ fixedPool.info.maxSize +
+ Object.keys(workerChoiceStrategyContext.opts.weights).length
+ } retries`
)
)
})