test: improve WCS coverage
[poolifier.git] / tests / pools / selection-strategies / worker-choice-strategy-context.test.js
index 2070f8e03301aca85ac8215c52e96e11bb065acd..df8cd25cb375a4aa50db889c7b014e4c17b22f9c 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,14 @@ describe('Worker choice strategy context test suite', () => {
       WorkerChoiceStrategyUndefinedStub
     )
     expect(() => workerChoiceStrategyContext.execute()).toThrowError(
-      new Error('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 Error('Worker node key chosen is null or undefined')
+      new Error('Worker node key chosen is null or undefined after 6 retries')
     )
   })