Increased test timeouts, we need to look into that as soon as we can
authoraardizio <alessandroardizio94@gmail.com>
Tue, 16 Feb 2021 11:37:08 +0000 (12:37 +0100)
committeraardizio <alessandroardizio94@gmail.com>
Tue, 16 Feb 2021 11:37:08 +0000 (12:37 +0100)
tests/pools/cluster/fixed.test.js
tests/pools/thread/dynamic.test.js

index 51501df0350dde87d73be94cc4ddebb7be66cee2..87f7376ceb7d18fb8c9f5e676a264af53a5ea4cf 100644 (file)
@@ -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)
   })
 
index 836e6591481ef1cfa567e0d1abcc15a2830e94eb..107ca8665d56ac5e57134ac9be2bede7e7063d6c 100644 (file)
@@ -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)
   })