Merge pull request #880 from poolifier/dependabot/npm_and_yarn/examples/typescript...
[poolifier.git] / tests / pools / selection-strategies / worker-choice-strategy-context.test.js
index 808a44cb096b77894b0ad34fd3a1c865091c0722..63e58d57ed3a9bec4ce6d92c61283379385f2a04 100644 (file)
@@ -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'
+      )
     )
   })