From bbd4fee5665b180c2bbdf8f891219a76363b65af Mon Sep 17 00:00:00 2001 From: hveldstra Date: Fri, 19 Jul 2024 12:24:58 +0100 Subject: [PATCH] fix: explicitly stop worker threads This was previously done at Launcher level, but has now been delegated to platform implementation --- packages/artillery/lib/platform/local/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/artillery/lib/platform/local/index.js b/packages/artillery/lib/platform/local/index.js index 3cd4bf214c..0e5decc189 100644 --- a/packages/artillery/lib/platform/local/index.js +++ b/packages/artillery/lib/platform/local/index.js @@ -137,6 +137,10 @@ class PlatformLocal { // 'after' hook is executed in the main thread, after all workers // are done await this.runHook('after', this.contextVars); + + for (const [workerId, w] of Object.entries(this.workers)) { + await this.stopWorker(workerId); + } } // ********