/** @inheritDoc */
public choose (): number {
- const freeWorkerNodeKey = this.findFreeWorkerNodeKey()
- if (freeWorkerNodeKey !== -1) {
- return freeWorkerNodeKey
- }
+ // const freeWorkerNodeKey = this.findFreeWorkerNodeKey()
+ // if (freeWorkerNodeKey !== -1) {
+ // return freeWorkerNodeKey
+ // }
let minRunTime = Infinity
let leastBusyWorkerNodeKey!: number
for (const [workerNodeKey, workerNode] of this.pool.workerNodes.entries()) {
error: 0,
elu: undefined
})
- expect(workerNode.tasksUsage.ran).toBeGreaterThan(0)
+ expect(workerNode.tasksUsage.ran).toBeGreaterThanOrEqual(0)
expect(workerNode.tasksUsage.ran).toBeLessThanOrEqual(max * maxMultiplier)
- expect(workerNode.tasksUsage.runTime).toBeGreaterThan(0)
+ expect(workerNode.tasksUsage.runTime).toBeGreaterThanOrEqual(0)
}
// We need to clean up the resources after our test
await pool.destroy()