X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fthread%2Fdynamic.test.js;h=6e6142b715b802493928b8d5d7031ecaf1ebe76f;hb=58399427588adb63380e6bfe955dbdf4ea8ea8a5;hp=b5ba62bb07a1b1abb06bee6bbfb411758f9b455a;hpb=73bfd59d83bc832e72e594de1f23bcd5290a16cd;p=poolifier.git diff --git a/tests/pools/thread/dynamic.test.js b/tests/pools/thread/dynamic.test.js index b5ba62bb..6e6142b7 100644 --- a/tests/pools/thread/dynamic.test.js +++ b/tests/pools/thread/dynamic.test.js @@ -1,6 +1,6 @@ const { expect } = require('expect') const { DynamicThreadPool, PoolEvents } = require('../../../lib') -const { WorkerFunctions } = require('../../test-types') +const { TaskFunctions } = require('../../test-types') const { sleep, waitWorkerEvents } = require('../../test-utils') describe('Dynamic thread pool test suite', () => { @@ -11,17 +11,17 @@ describe('Dynamic thread pool test suite', () => { max, './tests/worker-files/thread/testWorker.js', { - errorHandler: e => console.error(e) + errorHandler: (e) => console.error(e) } ) it('Verify that the function is executed in a worker thread', async () => { let result = await pool.execute({ - function: WorkerFunctions.fibonacci + function: TaskFunctions.fibonacci }) expect(result).toBe(75025) result = await pool.execute({ - function: WorkerFunctions.factorial + function: TaskFunctions.factorial }) expect(result).toBe(9.33262154439441e157) }) @@ -88,7 +88,7 @@ describe('Dynamic thread pool test suite', () => { max, './tests/worker-files/thread/longRunningWorkerHardBehavior.js', { - errorHandler: e => console.error(e), + errorHandler: (e) => console.error(e), onlineHandler: () => console.info('long executing worker is online'), exitHandler: () => console.info('long executing worker exited') } @@ -115,7 +115,7 @@ describe('Dynamic thread pool test suite', () => { max, './tests/worker-files/thread/longRunningWorkerSoftBehavior.js', { - errorHandler: e => console.error(e), + errorHandler: (e) => console.error(e), onlineHandler: () => console.info('long executing worker is online'), exitHandler: () => console.info('long executing worker exited') }