refactor: prepare worker choice strategies code for worker readiness
[poolifier.git] / tests / pools / thread / dynamic.test.js
index 65d162399ab798aad102f6978de8a37a5c36a015..4f3dfb6d92f0a761a8cfbc766a91fde55b1c29b8 100644 (file)
@@ -77,7 +77,7 @@ describe('Dynamic thread pool test suite', () => {
       './tests/worker-files/thread/testWorker.js'
     )
     const res = await pool1.execute()
-    expect(res).toBe(false)
+    expect(res).toStrictEqual({ ok: 1 })
     // We need to clean up the resources after our test
     await pool1.destroy()
   })
@@ -103,7 +103,7 @@ describe('Dynamic thread pool test suite', () => {
     expect(
       longRunningPool.workerChoiceStrategyContext.workerChoiceStrategies.get(
         longRunningPool.workerChoiceStrategyContext.workerChoiceStrategy
-      ).nextWorkerNodeId
+      ).nextWorkerNodeKey
     ).toBeLessThan(longRunningPool.workerNodes.length)
     // We need to clean up the resources after our test
     await longRunningPool.destroy()