From 8954c0a3cd5941d5c86f40eb627ae681770fade7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 11 Dec 2023 19:09:39 +0100 Subject: [PATCH] test: destroy pool in async context tracking test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- tests/pools/abstract-pool.test.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/pools/abstract-pool.test.mjs b/tests/pools/abstract-pool.test.mjs index ec4ffabc..edf03f4a 100644 --- a/tests/pools/abstract-pool.test.mjs +++ b/tests/pools/abstract-pool.test.mjs @@ -1291,17 +1291,18 @@ describe('Abstract pool test suite', () => { if (executionAsyncId() === taskAsyncId) resolveCalls++ } }) - hook.enable() const pool = new FixedThreadPool( numberOfWorkers, './tests/worker-files/thread/testWorker.mjs' ) + hook.enable() await pool.execute() hook.disable() expect(initCalls).toBe(1) expect(beforeCalls).toBe(1) expect(afterCalls).toBe(1) expect(resolveCalls).toBe(1) + await pool.destroy() }) it('Verify that hasTaskFunction() is working', async () => { -- 2.34.1