const { WorkerFunctions } = require('../../test-types')
const { waitPoolEvents, waitWorkerEvents } = require('../../test-utils')
-describe('Fixed cluster pool test suite', async () => {
+describe('Fixed cluster pool test suite', () => {
const numberOfWorkers = 6
const pool = new FixedClusterPool(
numberOfWorkers,
errorHandler: e => console.error(e)
}
)
- let poolReady = 0
- pool.emitter.on(PoolEvents.ready, () => ++poolReady)
- await waitPoolEvents(pool, PoolEvents.ready, 1)
const queuePool = new FixedClusterPool(
numberOfWorkers,
'./tests/worker-files/cluster/testWorker.js',
})
it("Verify that 'ready' event is emitted", async () => {
+ const pool1 = new FixedClusterPool(
+ numberOfWorkers,
+ './tests/worker-files/cluster/testWorker.js',
+ {
+ errorHandler: e => console.error(e)
+ }
+ )
+ let poolReady = 0
+ pool1.emitter.on(PoolEvents.ready, () => ++poolReady)
+ await waitPoolEvents(pool1, PoolEvents.ready, 1)
expect(poolReady).toBe(1)
})