expect(poolBusy).toBe(1)
const numberOfExitEvents = await waitWorkerEvents(pool, 'exit', max - min)
expect(numberOfExitEvents).toBe(max - min)
+ expect(pool.workerNodes.length).toBe(min)
})
it('Verify scale thread up and down is working', async () => {
- expect(pool.workerNodes.length).toBe(min)
for (let i = 0; i < max * 2; i++) {
pool.execute()
}
it('Validation of inputs test', () => {
expect(() => new DynamicThreadPool(min)).toThrow(
- "Cannot find the worker file 'undefined'"
+ 'The worker file path must be specified'
)
})