From: Jérôme Benoit Date: Thu, 13 Oct 2022 19:41:45 +0000 (+0200) Subject: Fix tests X-Git-Tag: v2.3.1~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=6cdd998caa931ce15a2c59f7e616e0611573ec72;p=poolifier.git Fix tests Signed-off-by: Jérôme Benoit --- 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 664a447a..24246595 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 @@ -22,7 +22,7 @@ describe('Weighted round robin strategy worker choice strategy test suite', () = await pool.destroy() }) - it.only('Verify that reset() resets internals', () => { + it('Verify that reset() resets internals', () => { const strategy = new WeightedRoundRobinWorkerChoiceStrategy(pool) const workersTaskRunTimeClearStub = sinon .stub(strategy.workersTaskRunTime, 'clear') diff --git a/tests/pools/selection-strategies/worker-choice-strategy-context.test.js b/tests/pools/selection-strategies/worker-choice-strategy-context.test.js index 8a3a7596..46ac017c 100644 --- a/tests/pools/selection-strategies/worker-choice-strategy-context.test.js +++ b/tests/pools/selection-strategies/worker-choice-strategy-context.test.js @@ -63,7 +63,7 @@ describe('Worker choice strategy context test suite', () => { workerChoiceStrategyContext.workerChoiceStrategy = WorkerChoiceStrategyStub const chosenWorker = workerChoiceStrategyContext.execute() expect( - workerChoiceStrategyContext.workerChoiceStrategy.choose.calledOnce + workerChoiceStrategyContext.getWorkerChoiceStrategy().choose.calledOnce ).toBe(true) expect(chosenWorker).toBe('worker') }) @@ -81,7 +81,7 @@ describe('Worker choice strategy context test suite', () => { workerChoiceStrategyContext.workerChoiceStrategy = WorkerChoiceStrategyStub const chosenWorker = workerChoiceStrategyContext.execute() expect( - workerChoiceStrategyContext.workerChoiceStrategy.choose.calledOnce + workerChoiceStrategyContext.getWorkerChoiceStrategy().choose.calledOnce ).toBe(true) expect(chosenWorker).toBe('worker') })