+ min,
+ max,
+ './tests/worker-files/cluster/testWorker.js'
+ )
+ const result = await pool1.execute()
+ expect(result).toBe(false)
+ // We need to clean up the resources after our test
+ await pool1.destroy()
+ })
+
+ it('Verify scale processes up and down is working when long running task is used:hard', async () => {
+ const longRunningPool = new DynamicClusterPool(
+ min,
+ max,
+ './tests/worker-files/cluster/longRunningWorkerHardBehavior.js',
+ {
+ errorHandler: e => console.error(e),
+ onlineHandler: () => console.log('long running worker is online'),
+ exitHandler: () => console.log('long running worker exited')
+ }