Rename FullPool event to busy, update benchmarks
[poolifier.git] / tests / pools / thread / dynamic.test.js
index 4ee247206ba8aa0646edb0db385d3dcaa6a54dd7..2e3a849257befecc2e3564518c099d2fa267005d 100644 (file)
@@ -21,13 +21,13 @@ 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 () => {
     const promises = []
-    let fullPool = 0
-    pool.emitter.on('FullPool', () => fullPool++)
+    let busy = 0
+    pool.emitter.on('busy', () => busy++)
     for (let i = 0; i < max * 2; i++) {
       promises.push(pool.execute({ test: 'test' }))
     }
     expect(pool.workers.length).toBe(max)
-    expect(fullPool > 1).toBeTruthy()
+    expect(busy > 1).toBeTruthy()
     const res = await TestUtils.waitExits(pool, max - min)
     expect(res).toBe(max - min)
   })