expect(pool.starting).toBe(false)
expect(pool.started).toBe(true)
await pool.destroy()
- expect(pool.started).toBe(false)
})
it('Verify that filePath is checked', () => {
pool.emitter.on(PoolEvents.destroy, () => ++poolDestroy)
await pool.destroy()
const numberOfExitEvents = await exitPromise
+ expect(pool.started).toBe(false)
+ expect(pool.workerNodes.length).toBe(0)
expect(numberOfExitEvents).toBe(min)
expect(poolDestroy).toBe(1)
})
pool.emitter.on(PoolEvents.destroy, () => ++poolDestroy)
await pool.destroy()
const numberOfExitEvents = await exitPromise
+ expect(pool.started).toBe(false)
+ expect(pool.workerNodes.length).toBe(0)
expect(numberOfExitEvents).toBe(numberOfWorkers)
expect(poolDestroy).toBe(1)
})
pool.emitter.on(PoolEvents.destroy, () => ++poolDestroy)
await pool.destroy()
const numberOfExitEvents = await exitPromise
+ expect(pool.started).toBe(false)
+ expect(pool.workerNodes.length).toBe(0)
expect(numberOfExitEvents).toBe(min)
expect(poolDestroy).toBe(1)
})
pool.emitter.on(PoolEvents.destroy, () => ++poolDestroy)
await pool.destroy()
const numberOfExitEvents = await exitPromise
+ expect(pool.started).toBe(false)
+ expect(pool.workerNodes.length).toBe(0)
expect(numberOfExitEvents).toBe(numberOfThreads)
expect(poolDestroy).toBe(1)
})
expect(getWorkerId(clusterWorker)).toBe(clusterWorker.id)
})
- it.skip('Verify sleep() behavior', async () => {
+ it('Verify sleep() behavior', async () => {
const start = performance.now()
await sleep(1000)
const elapsed = performance.now() - start