fix: properly handle dynamic pool with zero minimum size
[poolifier.git] / tests / pools / selection-strategies / selection-strategies.test.mjs
index 8dc06262d2d35418b1ff050bff843ce03b1efe97..bca3c82b1647e22146b6094321d7c9ac60485403 100644 (file)
@@ -143,25 +143,6 @@ describe('Selection strategies test suite', () => {
     await pool.destroy()
   })
 
-  it('Verify strategies wait for worker node readiness in dynamic pool', async () => {
-    const pool = new DynamicThreadPool(
-      min,
-      max,
-      './tests/worker-files/thread/testWorker.mjs'
-    )
-    expect(pool.starting).toBe(false)
-    expect(pool.workerNodes.length).toBe(min)
-    const maxMultiplier = 10000
-    const promises = new Set()
-    for (let i = 0; i < max * maxMultiplier; i++) {
-      promises.add(pool.execute())
-    }
-    await Promise.all(promises)
-    expect(pool.workerNodes.length).toBe(max)
-    // We need to clean up the resources after our test
-    await pool.destroy()
-  })
-
   it('Verify ROUND_ROBIN strategy default policy', async () => {
     const workerChoiceStrategy = WorkerChoiceStrategies.ROUND_ROBIN
     let pool = new FixedThreadPool(