perf: use a single array to store pool workers and their related data
[poolifier.git] / tests / pools / cluster / dynamic.test.js
index b1fd166e87b6be473d9e697a57af7fbc017e9ea9..ddf42501d43ed63a3f84831b3aa2b13ba44fc701 100644 (file)
@@ -28,7 +28,7 @@ describe('Dynamic cluster 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('busy', () => ++poolBusy)
     for (let i = 0; i < max * 2; i++) {
       pool.execute()
     }