test: import RR worker choice strategy expectation
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 31 May 2023 18:32:08 +0000 (20:32 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 31 May 2023 18:32:08 +0000 (20:32 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
tests/pools/selection-strategies/selection-strategies.test.js

index b7e6237d19874b1d036f24e5d15bf5588a924eef..eb30d0e17753e668ea5d9df34a8cbc734dd85210 100644 (file)
@@ -180,6 +180,11 @@ describe('Selection strategies test suite', () => {
         error: 0
       })
     }
+    expect(
+      pool.workerChoiceStrategyContext.workerChoiceStrategies.get(
+        WorkerChoiceStrategies.ROUND_ROBIN
+      ).nextWorkerNodeId
+    ).toBe(0)
     // We need to clean up the resources after our test
     await pool.destroy()
   })
@@ -213,6 +218,11 @@ describe('Selection strategies test suite', () => {
         error: 0
       })
     }
+    expect(
+      pool.workerChoiceStrategyContext.workerChoiceStrategies.get(
+        WorkerChoiceStrategies.ROUND_ROBIN
+      ).nextWorkerNodeId
+    ).toBe(0)
     // We need to clean up the resources after our test
     await pool.destroy()
   })