'./tests/worker-files/thread/testWorker.js',
{ workerChoiceStrategy: WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN }
)
+ expect(
+ pool.workerChoiceStrategyContext.getWorkerChoiceStrategy().nextWorkerIndex
+ ).toBeUndefined()
pool.setWorkerChoiceStrategy(WorkerChoiceStrategies.ROUND_ROBIN)
expect(
pool.workerChoiceStrategyContext.getWorkerChoiceStrategy().nextWorkerIndex
'./tests/worker-files/thread/testWorker.js',
{ workerChoiceStrategy: WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN }
)
+ expect(
+ pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
+ .workerChoiceStrategy.nextWorkerIndex
+ ).toBeUndefined()
pool.setWorkerChoiceStrategy(WorkerChoiceStrategies.ROUND_ROBIN)
expect(
pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
max,
'./tests/worker-files/thread/testWorker.js'
)
+ expect(
+ pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
+ .previousWorkerIndex
+ ).toBeUndefined()
+ expect(
+ pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
+ .currentWorkerIndex
+ ).toBeUndefined()
+ expect(
+ pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
+ .defaultWorkerWeight
+ ).toBeUndefined()
expect(
pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
.workersTaskRunTime
max,
'./tests/worker-files/thread/testWorker.js'
)
+ expect(
+ pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
+ .workerChoiceStrategy.previousWorkerIndex
+ ).toBeUndefined()
+ expect(
+ pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
+ .workerChoiceStrategy.currentWorkerIndex
+ ).toBeUndefined()
+ expect(
+ pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
+ .workerChoiceStrategy.defaultWorkerWeight
+ ).toBeUndefined()
expect(
pool.workerChoiceStrategyContext.getWorkerChoiceStrategy()
.workerChoiceStrategy.workersTaskRunTime