Merge branch 'master' into add-worker-test
[poolifier.git] / tests / pools / cluster / fixed.test.js
index 87f7376ceb7d18fb8c9f5e676a264af53a5ea4cf..f5300eccf424c39028e340296b18d1d0492f45f4 100644 (file)
@@ -4,19 +4,22 @@ const numberOfWorkers = 10
 const maxTasks = 500
 const pool = new FixedClusterPool(
   numberOfWorkers,
-  './tests/worker/cluster/testWorker.js',
+  './tests/worker-files/cluster/testWorker.js',
   {
     errorHandler: e => console.error(e)
   }
 )
 const emptyPool = new FixedClusterPool(
   1,
-  './tests/worker/cluster/emptyWorker.js'
+  './tests/worker-files/cluster/emptyWorker.js'
+)
+const echoPool = new FixedClusterPool(
+  1,
+  './tests/worker-files/cluster/echoWorker.js'
 )
-const echoPool = new FixedClusterPool(1, './tests/worker/cluster/echoWorker.js')
 const errorPool = new FixedClusterPool(
   1,
-  './tests/worker/cluster/errorWorker.js',
+  './tests/worker-files/cluster/errorWorker.js',
   {
     errorHandler: e => console.error(e)
   }
@@ -24,14 +27,14 @@ const errorPool = new FixedClusterPool(
 
 const asyncErrorPool = new FixedClusterPool(
   1,
-  './tests/worker/cluster/asyncErrorWorker.js',
+  './tests/worker-files/cluster/asyncErrorWorker.js',
   {
     onlineHandler: () => console.log('worker is online')
   }
 )
 const asyncPool = new FixedClusterPool(
   1,
-  './tests/worker/cluster/asyncWorker.js',
+  './tests/worker-files/cluster/asyncWorker.js',
   {
     maxTasks: maxTasks
   }
@@ -138,7 +141,7 @@ describe('Fixed cluster pool test suite ', () => {
   it('Should work even without opts in input', async () => {
     const pool1 = new FixedClusterPool(
       1,
-      './tests/worker/cluster/testWorker.js'
+      './tests/worker-files/cluster/testWorker.js'
     )
     const res = await pool1.execute({ test: 'test' })
     expect(res).toBeFalsy()