From: aardizio Date: Tue, 16 Feb 2021 11:37:08 +0000 (+0100) Subject: Increased test timeouts, we need to look into that as soon as we can X-Git-Tag: v2.0.0-beta.2~17^2~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5efc2a90350b03cb26758a5adbd692b250a7d331;p=poolifier.git Increased test timeouts, we need to look into that as soon as we can --- diff --git a/tests/pools/cluster/fixed.test.js b/tests/pools/cluster/fixed.test.js index 51501df0..87f7376c 100644 --- a/tests/pools/cluster/fixed.test.js +++ b/tests/pools/cluster/fixed.test.js @@ -119,7 +119,7 @@ describe('Fixed cluster pool test suite ', () => { }) }) await pool.destroy() - await new Promise(resolve => setTimeout(resolve, 200)) + await new Promise(resolve => setTimeout(resolve, 500)) expect(closedWorkers).toBe(numberOfWorkers) }) diff --git a/tests/pools/thread/dynamic.test.js b/tests/pools/thread/dynamic.test.js index 836e6591..107ca866 100644 --- a/tests/pools/thread/dynamic.test.js +++ b/tests/pools/thread/dynamic.test.js @@ -49,7 +49,7 @@ describe('Dynamic thread pool test suite ', () => { pool.execute({ test: 'test' }) } expect(pool.workers.length).toBe(max) - await new Promise(resolve => setTimeout(resolve, 1000)) + await new Promise(resolve => setTimeout(resolve, 1500)) expect(pool.workers.length).toBe(min) }) @@ -101,7 +101,7 @@ describe('Dynamic thread pool test suite ', () => { longRunningPool.execute({ test: 'test' }) } expect(longRunningPool.workers.length).toBe(max) - await new Promise(resolve => setTimeout(resolve, 1000)) + await new Promise(resolve => setTimeout(resolve, 1500)) expect(longRunningPool.workers.length).toBe(min) }) @@ -120,7 +120,7 @@ describe('Dynamic thread pool test suite ', () => { longRunningPool.execute({ test: 'test' }) } expect(longRunningPool.workers.length).toBe(max) - await new Promise(resolve => setTimeout(resolve, 1000)) + await new Promise(resolve => setTimeout(resolve, 1500)) // Here we expect the workers to be at the max size since that the task is still running expect(longRunningPool.workers.length).toBe(max) })