Fix tests
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 13 Oct 2022 19:41:45 +0000 (21:41 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 13 Oct 2022 19:41:45 +0000 (21:41 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
tests/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.test.js
tests/pools/selection-strategies/worker-choice-strategy-context.test.js

index 664a447a1e829fc902842f0cc03966006d513540..24246595e6bdc92bcd40afad6638c31ef3842e83 100644 (file)
@@ -22,7 +22,7 @@ describe('Weighted round robin strategy worker choice strategy test suite', () =
     await pool.destroy()
   })
 
-  it.only('Verify that reset() resets internals', () => {
+  it('Verify that reset() resets internals', () => {
     const strategy = new WeightedRoundRobinWorkerChoiceStrategy(pool)
     const workersTaskRunTimeClearStub = sinon
       .stub(strategy.workersTaskRunTime, 'clear')
index 8a3a759610d167f86ad5085a4ec730686337e309..46ac017c223687891b0eccd438892ea1a22f6c51 100644 (file)
@@ -63,7 +63,7 @@ describe('Worker choice strategy context test suite', () => {
     workerChoiceStrategyContext.workerChoiceStrategy = WorkerChoiceStrategyStub
     const chosenWorker = workerChoiceStrategyContext.execute()
     expect(
-      workerChoiceStrategyContext.workerChoiceStrategy.choose.calledOnce
+      workerChoiceStrategyContext.getWorkerChoiceStrategy().choose.calledOnce
     ).toBe(true)
     expect(chosenWorker).toBe('worker')
   })
@@ -81,7 +81,7 @@ describe('Worker choice strategy context test suite', () => {
     workerChoiceStrategyContext.workerChoiceStrategy = WorkerChoiceStrategyStub
     const chosenWorker = workerChoiceStrategyContext.execute()
     expect(
-      workerChoiceStrategyContext.workerChoiceStrategy.choose.calledOnce
+      workerChoiceStrategyContext.getWorkerChoiceStrategy().choose.calledOnce
     ).toBe(true)
     expect(chosenWorker).toBe('worker')
   })