X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fselection-strategies%2Fworker-choice-strategy-context.test.js;h=63e58d57ed3a9bec4ce6d92c61283379385f2a04;hb=bde3557b4daaacaea222926c3ac6934dcb90fdaa;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..63e58d57 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,18 @@ describe('Worker choice strategy context test suite', () => { WorkerChoiceStrategyUndefinedStub ) expect(() => workerChoiceStrategyContext.execute()).toThrowError( - new TypeError('Worker node key chosen is null or undefined') + new TypeError( + '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 TypeError( + 'Worker node key chosen is null or undefined after 6 retries' + ) ) })