From 79cbc59fa3062de40166efeeeb68082f3591f2f6 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Fri, 5 Jun 2026 17:42:22 -0300 Subject: [PATCH] test(background): fix locust quitting handler signature so job accounting prints The events.quitting listener took _environment as a required positional arg, but locust passes environment as a keyword, so the handler raised TypeError at shutdown and the submitted/completed summary never printed (locust exited 2). Accept the event kwargs via **_kwargs. --- src/backend/tests/locust/v2_background_locustfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/tests/locust/v2_background_locustfile.py b/src/backend/tests/locust/v2_background_locustfile.py index 870a6281ac..17bb3a0ce3 100644 --- a/src/backend/tests/locust/v2_background_locustfile.py +++ b/src/backend/tests/locust/v2_background_locustfile.py @@ -148,7 +148,7 @@ class BackgroundWorkflowUser(FastHttpUser): @events.quitting.add_listener -def _print_counts(_environment, **_kwargs) -> None: +def _print_counts(**_kwargs) -> None: with _lock: snap = dict(COUNTS) total = snap["submitted"] or 1