X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fpools%2Fthread%2Fdynamic.test.js;h=9f69860aa408e42c444434dadcaf6f6ca7e1bfe5;hb=aee467366d8c393b79e7af82c6a7ab12338ee64e;hp=d8c68e90c51100886bc8fe83ebfba8ec2ef094f1;hpb=36b5e78f5d0a98040273f48b409e643fe5902913;p=poolifier.git diff --git a/tests/pools/thread/dynamic.test.js b/tests/pools/thread/dynamic.test.js index d8c68e90..9f69860a 100644 --- a/tests/pools/thread/dynamic.test.js +++ b/tests/pools/thread/dynamic.test.js @@ -1,5 +1,5 @@ const { expect } = require('expect') -const { DynamicThreadPool } = require('../../../lib/index') +const { DynamicThreadPool, PoolEvents } = require('../../../lib/index') const { WorkerFunctions } = require('../../test-types') const TestUtils = require('../../test-utils') @@ -28,7 +28,7 @@ describe('Dynamic thread pool test suite', () => { it('Verify that new workers are created when required, max size is not exceeded and that after a while new workers will die', async () => { let poolBusy = 0 - pool.emitter.on('busy', () => ++poolBusy) + pool.emitter.on(PoolEvents.busy, () => ++poolBusy) for (let i = 0; i < max * 2; i++) { pool.execute() }