it('Verify that reset() resets internals', () => {
const strategy = new WeightedRoundRobinWorkerChoiceStrategy(pool)
- strategy.previousWorkerIndex = TestUtils.generateRandomInteger(
- Number.MAX_SAFE_INTEGER
- )
- strategy.currentWorkerIndex = TestUtils.generateRandomInteger(
- Number.MAX_SAFE_INTEGER
- )
+ strategy.previousWorkerIndex = TestUtils.generateRandomInteger()
+ strategy.currentWorkerIndex = TestUtils.generateRandomInteger()
const workersTaskRunTimeClearStub = sinon
.stub(strategy.workersTaskRunTime, 'clear')
.returns()
})
}
- static generateRandomInteger (max, min = 0) {
+ static generateRandomInteger (max = Number.MAX_SAFE_INTEGER, min = 0) {
max = Math.floor(max)
if (min) {
min = Math.ceil(min)