From: Shinigami92 Date: Sun, 14 Feb 2021 13:39:37 +0000 (+0100) Subject: Rename folder X-Git-Tag: v2.0.0-beta.2~15^2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=76b1e974f09148b895e52e0c96d1c8379519ff7a;p=poolifier.git Rename folder --- diff --git a/tests/pools/cluster/dynamic.test.js b/tests/pools/cluster/dynamic.test.js index 6a82b057..36d17d86 100644 --- a/tests/pools/cluster/dynamic.test.js +++ b/tests/pools/cluster/dynamic.test.js @@ -5,7 +5,7 @@ const max = 3 const pool = new DynamicClusterPool( min, max, - './tests/worker/cluster/testWorker.js', + './tests/worker-files/cluster/testWorker.js', { errorHandler: e => console.error(e), onlineHandler: () => console.log('worker is online') @@ -82,7 +82,7 @@ describe('Dynamic cluster pool test suite ', () => { const pool1 = new DynamicClusterPool( 1, 1, - './tests/worker/cluster/testWorker.js' + './tests/worker-files/cluster/testWorker.js' ) const res = await pool1.execute({ test: 'test' }) expect(res).toBeFalsy() diff --git a/tests/pools/cluster/fixed.test.js b/tests/pools/cluster/fixed.test.js index d22f697a..1cbfadf5 100644 --- a/tests/pools/cluster/fixed.test.js +++ b/tests/pools/cluster/fixed.test.js @@ -4,7 +4,7 @@ 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), onlineHandler: () => console.log('worker is online') @@ -12,12 +12,15 @@ const pool = new FixedClusterPool( ) 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), onlineHandler: () => console.log('worker is online') @@ -26,14 +29,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 } @@ -140,7 +143,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() diff --git a/tests/pools/thread/dynamic.test.js b/tests/pools/thread/dynamic.test.js index 98a0dd0f..5f6dc8ba 100644 --- a/tests/pools/thread/dynamic.test.js +++ b/tests/pools/thread/dynamic.test.js @@ -5,7 +5,7 @@ const max = 3 const pool = new DynamicThreadPool( min, max, - './tests/worker/thread/testWorker.js', + './tests/worker-files/thread/testWorker.js', { errorHandler: e => console.error(e), onlineHandler: () => console.log('worker is online') @@ -80,7 +80,7 @@ describe('Dynamic thread pool test suite ', () => { const pool1 = new DynamicThreadPool( 1, 1, - './tests/worker/thread/testWorker.js' + './tests/worker-files/thread/testWorker.js' ) const res = await pool1.execute({ test: 'test' }) expect(res).toBeFalsy() diff --git a/tests/pools/thread/fixed.test.js b/tests/pools/thread/fixed.test.js index a5ec3f0a..ff945a70 100644 --- a/tests/pools/thread/fixed.test.js +++ b/tests/pools/thread/fixed.test.js @@ -4,17 +4,23 @@ const numberOfThreads = 10 const maxTasks = 400 const pool = new FixedThreadPool( numberOfThreads, - './tests/worker/thread/testWorker.js', + './tests/worker-files/thread/testWorker.js', { errorHandler: e => console.error(e), onlineHandler: () => console.log('worker is online') } ) -const emptyPool = new FixedThreadPool(1, './tests/worker/thread/emptyWorker.js') -const echoPool = new FixedThreadPool(1, './tests/worker/thread/echoWorker.js') +const emptyPool = new FixedThreadPool( + 1, + './tests/worker-files/thread/emptyWorker.js' +) +const echoPool = new FixedThreadPool( + 1, + './tests/worker-files/thread/echoWorker.js' +) const errorPool = new FixedThreadPool( 1, - './tests/worker/thread/errorWorker.js', + './tests/worker-files/thread/errorWorker.js', { errorHandler: e => console.error(e), onlineHandler: () => console.log('worker is online') @@ -22,7 +28,7 @@ const errorPool = new FixedThreadPool( ) const asyncPool = new FixedThreadPool( 1, - './tests/worker/thread/asyncWorker.js', + './tests/worker-files/thread/asyncWorker.js', { maxTasks: maxTasks } ) @@ -111,7 +117,10 @@ describe('Fixed thread pool test suite ', () => { }) it('Should work even without opts in input', async () => { - const pool1 = new FixedThreadPool(1, './tests/worker/thread/testWorker.js') + const pool1 = new FixedThreadPool( + 1, + './tests/worker-files/thread/testWorker.js' + ) const res = await pool1.execute({ test: 'test' }) expect(res).toBeFalsy() }) diff --git a/tests/worker/cluster/asyncErrorWorker.js b/tests/worker-files/cluster/asyncErrorWorker.js similarity index 100% rename from tests/worker/cluster/asyncErrorWorker.js rename to tests/worker-files/cluster/asyncErrorWorker.js diff --git a/tests/worker/cluster/asyncWorker.js b/tests/worker-files/cluster/asyncWorker.js similarity index 100% rename from tests/worker/cluster/asyncWorker.js rename to tests/worker-files/cluster/asyncWorker.js diff --git a/tests/worker/cluster/echoWorker.js b/tests/worker-files/cluster/echoWorker.js similarity index 100% rename from tests/worker/cluster/echoWorker.js rename to tests/worker-files/cluster/echoWorker.js diff --git a/tests/worker/cluster/emptyWorker.js b/tests/worker-files/cluster/emptyWorker.js similarity index 100% rename from tests/worker/cluster/emptyWorker.js rename to tests/worker-files/cluster/emptyWorker.js diff --git a/tests/worker/cluster/errorWorker.js b/tests/worker-files/cluster/errorWorker.js similarity index 100% rename from tests/worker/cluster/errorWorker.js rename to tests/worker-files/cluster/errorWorker.js diff --git a/tests/worker/cluster/testWorker.js b/tests/worker-files/cluster/testWorker.js similarity index 100% rename from tests/worker/cluster/testWorker.js rename to tests/worker-files/cluster/testWorker.js diff --git a/tests/worker/thread/asyncWorker.js b/tests/worker-files/thread/asyncWorker.js similarity index 100% rename from tests/worker/thread/asyncWorker.js rename to tests/worker-files/thread/asyncWorker.js diff --git a/tests/worker/thread/echoWorker.js b/tests/worker-files/thread/echoWorker.js similarity index 100% rename from tests/worker/thread/echoWorker.js rename to tests/worker-files/thread/echoWorker.js diff --git a/tests/worker/thread/emptyWorker.js b/tests/worker-files/thread/emptyWorker.js similarity index 100% rename from tests/worker/thread/emptyWorker.js rename to tests/worker-files/thread/emptyWorker.js diff --git a/tests/worker/thread/errorWorker.js b/tests/worker-files/thread/errorWorker.js similarity index 100% rename from tests/worker/thread/errorWorker.js rename to tests/worker-files/thread/errorWorker.js diff --git a/tests/worker/thread/testWorker.js b/tests/worker-files/thread/testWorker.js similarity index 100% rename from tests/worker/thread/testWorker.js rename to tests/worker-files/thread/testWorker.js