)
expect(
() =>
- new DynamicClusterPool(
- 1,
- 1,
- './tests/worker-files/cluster/testWorker.js'
- )
+ new DynamicThreadPool(0, 0, './tests/worker-files/thread/testWorker.js')
).toThrowError(
new RangeError(
- 'Cannot instantiate a dynamic pool with a minimum pool size equal to the maximum pool size. Use a fixed pool instead'
+ 'Cannot instantiate a dynamic pool with a maximum pool size equal to zero'
)
)
expect(
() =>
- new DynamicThreadPool(0, 0, './tests/worker-files/thread/testWorker.js')
+ new DynamicClusterPool(
+ 1,
+ 1,
+ './tests/worker-files/cluster/testWorker.js'
+ )
).toThrowError(
new RangeError(
- 'Cannot instantiate a dynamic pool with a maximum pool size equal to zero'
+ 'Cannot instantiate a dynamic pool with a minimum pool size equal to the maximum pool size. Use a fixed pool instead'
)
)
})
expect(workerNode.tasksQueue.size).toBe(0)
expect(workerNode.tasksQueue.maxSize).toBe(0)
}
+ await pool.destroy()
})
it('Verify that pool worker info are initialized', async () => {
ready: true
})
}
+ await pool.destroy()
})
it('Verify that pool execute() arguments are checked', async () => {