X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fselection-strategies%2Fweighted-round-robin-worker-choice-strategy.test.js;h=cc3e66a49e752b349e4ae8153facbddfadca81ac;hb=3032893add6cc97da7b0600e21df2865ad1f675c;hp=41c7751cc61d75eabc1762c7f3296f0f08945e9d;hpb=f931db5c2405593ceeef6e3ea86c784e6cf82165;p=poolifier.git diff --git a/tests/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.test.js b/tests/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.test.js index 41c7751c..cc3e66a4 100644 --- a/tests/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.test.js +++ b/tests/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.test.js @@ -25,12 +25,7 @@ describe('Weighted round robin strategy worker choice strategy test suite', () = 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.currentWorkerId = TestUtils.generateRandomInteger() const workersTaskRunTimeClearStub = sinon .stub(strategy.workersTaskRunTime, 'clear') .returns() @@ -39,8 +34,7 @@ describe('Weighted round robin strategy worker choice strategy test suite', () = .returns() const resetResult = strategy.reset() expect(resetResult).toBe(true) - expect(strategy.previousWorkerIndex).toBe(0) - expect(strategy.currentWorkerIndex).toBe(0) + expect(strategy.currentWorkerId).toBe(0) expect(workersTaskRunTimeClearStub.calledOnce).toBe(true) expect(initWorkersTaskRunTimeStub.calledOnce).toBe(true) })