X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fselection-strategies%2Fworker-choice-strategy-context.test.js;h=df8cd25cb375a4aa50db889c7b014e4c17b22f9c;hb=4735284627d276d3532cb3bd4b6d7fe392bb6b8b;hp=808a44cb096b77894b0ad34fd3a1c865091c0722;hpb=aa9eede876376ffbb6d8585192f3865849252f5c;p=poolifier.git 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 808a44cb..df8cd25c 100644 --- a/tests/pools/selection-strategies/worker-choice-strategy-context.test.js +++ b/tests/pools/selection-strategies/worker-choice-strategy-context.test.js @@ -91,7 +91,7 @@ describe('Worker choice strategy context test suite', () => { expect(chosenWorkerKey).toBe(0) }) - it('Verify that execute() throws error if null or undefined is returned', () => { + it('Verify that execute() throws error if null or undefined is returned after retries', () => { const workerChoiceStrategyContext = new WorkerChoiceStrategyContext( fixedPool ) @@ -115,14 +115,14 @@ describe('Worker choice strategy context test suite', () => { WorkerChoiceStrategyUndefinedStub ) expect(() => workerChoiceStrategyContext.execute()).toThrowError( - new TypeError('Worker node key chosen is null or undefined') + new Error('Worker node key chosen is null or undefined after 6 retries') ) workerChoiceStrategyContext.workerChoiceStrategies.set( workerChoiceStrategyContext.workerChoiceStrategy, WorkerChoiceStrategyNullStub ) expect(() => workerChoiceStrategyContext.execute()).toThrowError( - new TypeError('Worker node key chosen is null or undefined') + new Error('Worker node key chosen is null or undefined after 6 retries') ) })