From: Jérôme Benoit Date: Tue, 3 Oct 2023 19:22:17 +0000 (+0200) Subject: test: fix async/await imbalance X-Git-Tag: v3.0.0~15 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1cc6e9ef64f399f4ca58da8079ef72a011ac4227;p=poolifier.git test: fix async/await imbalance Signed-off-by: Jérôme Benoit --- diff --git a/tests/pools/cluster/fixed.test.mjs b/tests/pools/cluster/fixed.test.mjs index 7d829f32..4471f513 100644 --- a/tests/pools/cluster/fixed.test.mjs +++ b/tests/pools/cluster/fixed.test.mjs @@ -318,7 +318,7 @@ describe('Fixed cluster pool test suite', () => { await pool.destroy() }) - it('Verify that a pool with zero worker fails', async () => { + it('Verify that a pool with zero worker fails', () => { expect( () => new FixedClusterPool(0, './tests/worker-files/cluster/testWorker.js') diff --git a/tests/pools/thread/fixed.test.mjs b/tests/pools/thread/fixed.test.mjs index 3969c83a..fd7f5935 100644 --- a/tests/pools/thread/fixed.test.mjs +++ b/tests/pools/thread/fixed.test.mjs @@ -338,7 +338,7 @@ describe('Fixed thread pool test suite', () => { await pool.destroy() }) - it('Verify that a pool with zero worker fails', async () => { + it('Verify that a pool with zero worker fails', () => { expect( () => new FixedThreadPool(0, './tests/worker-files/thread/testWorker.mjs') ).toThrowError('Cannot instantiate a fixed pool with zero worker') diff --git a/tests/worker/abstract-worker.test.mjs b/tests/worker/abstract-worker.test.mjs index e15f60a5..df844eef 100644 --- a/tests/worker/abstract-worker.test.mjs +++ b/tests/worker/abstract-worker.test.mjs @@ -179,7 +179,7 @@ describe('Abstract worker test suite', () => { it('Verify that async kill handler is called when worker is killed', () => { const killHandlerStub = stub().returns() const worker = new ClusterWorker(() => {}, { - killHandler: async () => Promise.resolve(killHandlerStub()) + killHandler: async () => await Promise.resolve(killHandlerStub()) }) worker.isMain = false worker.handleKillMessage()