Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
await pool.destroy()
})
- it('Verify that a pool with zero worker fails', async () => {
+ it('Verify that a pool with zero worker fails', () => {
expect(
() =>
new FixedClusterPool(0, './tests/worker-files/cluster/testWorker.js')
await pool.destroy()
})
- it('Verify that a pool with zero worker fails', async () => {
+ it('Verify that a pool with zero worker fails', () => {
expect(
() => new FixedThreadPool(0, './tests/worker-files/thread/testWorker.mjs')
).toThrowError('Cannot instantiate a fixed pool with zero worker')
it('Verify that async kill handler is called when worker is killed', () => {
const killHandlerStub = stub().returns()
const worker = new ClusterWorker(() => {}, {
- killHandler: async () => Promise.resolve(killHandlerStub())
+ killHandler: async () => await Promise.resolve(killHandlerStub())
})
worker.isMain = false
worker.handleKillMessage()