X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fthread%2Ffixed.test.js;h=080ebad6ec8fa19b682bff11ae0f6634802c393e;hb=3dba671e8b5f66e6598e3cc25a3472b27391e8ed;hp=e4b99a6378d226535f83e47fb5516e3d394212f2;hpb=4e377863ebacc8cead467297d0365e93dec491c3;p=poolifier.git diff --git a/tests/pools/thread/fixed.test.js b/tests/pools/thread/fixed.test.js index e4b99a63..080ebad6 100644 --- a/tests/pools/thread/fixed.test.js +++ b/tests/pools/thread/fixed.test.js @@ -1,6 +1,6 @@ const { expect } = require('expect') const { FixedThreadPool, PoolEvents } = require('../../../lib') -const { WorkerFunctions } = require('../../test-types') +const { TaskFunctions } = require('../../test-types') const { waitPoolEvents, waitWorkerEvents } = require('../../test-utils') describe('Fixed thread pool test suite', () => { @@ -27,7 +27,7 @@ describe('Fixed thread pool test suite', () => { const emptyPool = new FixedThreadPool( numberOfThreads, './tests/worker-files/thread/emptyWorker.js', - { exitHandler: () => console.log('empty pool worker exited') } + { exitHandler: () => console.info('empty pool worker exited') } ) const echoPool = new FixedThreadPool( numberOfThreads, @@ -64,11 +64,11 @@ describe('Fixed thread pool test suite', () => { 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) })