test: add missing pool destroy() calls
[poolifier.git] / tests / pools / thread / dynamic.test.js
index ea9964caab100ac04a17deba24682f287d79cc7e..2f3f4510cdc9567bdceb7a3951a606afb0168909 100644 (file)
@@ -72,15 +72,15 @@ describe('Dynamic thread pool test suite', () => {
   })
 
   it('Should work even without opts in input', async () => {
-    const pool1 = new DynamicThreadPool(
+    const pool = new DynamicThreadPool(
       min,
       max,
       './tests/worker-files/thread/testWorker.js'
     )
-    const res = await pool1.execute()
+    const res = await pool.execute()
     expect(res).toStrictEqual({ ok: 1 })
     // We need to clean up the resources after our test
-    await pool1.destroy()
+    await pool.destroy()
   })
 
   it('Verify scale thread up and down is working when long executing task is used:hard', async () => {