'./tests/worker-files/cluster/testWorker.js'
)
const result = await pool1.execute()
- expect(result).toBe(false)
+ expect(result).toStrictEqual({ ok: 1 })
// We need to clean up the resources after our test
await pool1.destroy()
})
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()
longRunningPool.execute()
}
expect(longRunningPool.workerNodes.length).toBe(max)
- await sleep(1500)
+ await sleep(1000)
// Here we expect the workerNodes to be at the max size since the task is still executing
expect(longRunningPool.workerNodes.length).toBe(max)
// We need to clean up the resources after our test