From 33d2304b9613b43bf8b1ee28de5bf1b8eada99c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 3 Oct 2023 13:34:38 +0200 Subject: [PATCH] refactor: cleanup variable namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../worker-choice-strategy-context.test.mjs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/pools/selection-strategies/worker-choice-strategy-context.test.mjs b/tests/pools/selection-strategies/worker-choice-strategy-context.test.mjs index e95911db..dc898e4f 100644 --- a/tests/pools/selection-strategies/worker-choice-strategy-context.test.mjs +++ b/tests/pools/selection-strategies/worker-choice-strategy-context.test.mjs @@ -53,7 +53,7 @@ describe('Worker choice strategy context test suite', () => { const workerChoiceStrategyContext = new WorkerChoiceStrategyContext( fixedPool ) - const WorkerChoiceStrategyStub = createStubInstance( + const workerChoiceStrategyStub = createStubInstance( RoundRobinWorkerChoiceStrategy, { choose: stub().returns(0) @@ -64,7 +64,7 @@ describe('Worker choice strategy context test suite', () => { ) workerChoiceStrategyContext.workerChoiceStrategies.set( workerChoiceStrategyContext.workerChoiceStrategy, - WorkerChoiceStrategyStub + workerChoiceStrategyStub ) const chosenWorkerKey = workerChoiceStrategyContext.execute() expect( @@ -79,13 +79,13 @@ describe('Worker choice strategy context test suite', () => { const workerChoiceStrategyContext = new WorkerChoiceStrategyContext( fixedPool ) - const WorkerChoiceStrategyUndefinedStub = createStubInstance( + const workerChoiceStrategyUndefinedStub = createStubInstance( RoundRobinWorkerChoiceStrategy, { choose: stub().returns(undefined) } ) - const WorkerChoiceStrategyNullStub = createStubInstance( + const workerChoiceStrategyNullStub = createStubInstance( RoundRobinWorkerChoiceStrategy, { choose: stub().returns(null) @@ -96,14 +96,14 @@ describe('Worker choice strategy context test suite', () => { ) workerChoiceStrategyContext.workerChoiceStrategies.set( workerChoiceStrategyContext.workerChoiceStrategy, - WorkerChoiceStrategyUndefinedStub + workerChoiceStrategyUndefinedStub ) expect(() => workerChoiceStrategyContext.execute()).toThrowError( new Error('Worker node key chosen is null or undefined after 6 retries') ) workerChoiceStrategyContext.workerChoiceStrategies.set( workerChoiceStrategyContext.workerChoiceStrategy, - WorkerChoiceStrategyNullStub + workerChoiceStrategyNullStub ) expect(() => workerChoiceStrategyContext.execute()).toThrowError( new Error('Worker node key chosen is null or undefined after 6 retries') @@ -114,7 +114,7 @@ describe('Worker choice strategy context test suite', () => { const workerChoiceStrategyContext = new WorkerChoiceStrategyContext( dynamicPool ) - const WorkerChoiceStrategyStub = createStubInstance( + const workerChoiceStrategyStub = createStubInstance( RoundRobinWorkerChoiceStrategy, { choose: stub().returns(0) @@ -125,7 +125,7 @@ describe('Worker choice strategy context test suite', () => { ) workerChoiceStrategyContext.workerChoiceStrategies.set( workerChoiceStrategyContext.workerChoiceStrategy, - WorkerChoiceStrategyStub + workerChoiceStrategyStub ) const chosenWorkerKey = workerChoiceStrategyContext.execute() expect( -- 2.34.1