From bee37b2cb89451ecf4cdfd95791992b760b2572f Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Wed, 15 Apr 2026 07:44:41 +0000 Subject: [PATCH] fix(tester): abort when TAP_GROUP is set but has no tests registered MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, if TAP_GROUP was set but the group had no entries in test/tap/groups/groups.json (typo, missing registration, etc.), the tester logged a warning and silently fell back to running ALL 325 TAP tests. In a multi-group parallel run this turns a misconfiguration into a multi-hour hang that only surfaces when the per-group TIMEOUT fires. We hit this in practice: mysql90-g[2-5] existed as launch targets in the runner but hadn't been populated in groups.json yet. The tester fell back to the full suite, and the groups TIMED OUT after chewing through pgsql tests they had no business running. Change behavior to log at CRITICAL and sys.exit(1) in two cases: 1. TAP_GROUP is set, groups.json is present, but the group has no tests registered. 2. TAP_GROUP is set and groups.json is missing entirely. The "no TAP_GROUP specified" path is unchanged — that's the legitimate way to run the full suite directly (outside the group runner). Error messages explicitly tell the operator what to do: either register tests for the group, or unset TAP_GROUP to run the full suite intentionally. --- test/scripts/bin/proxysql-tester.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/test/scripts/bin/proxysql-tester.py b/test/scripts/bin/proxysql-tester.py index 0b3aef8c7..8efbf47e1 100755 --- a/test/scripts/bin/proxysql-tester.py +++ b/test/scripts/bin/proxysql-tester.py @@ -647,11 +647,19 @@ CREATE TABLE stats_history.mysql_server_read_only_log ( if group_has_tests: log.info(f"Group '{TAP_GROUP}' has associated tests in groups.json") else: - log.warning(f"Group '{TAP_GROUP}' has no associated tests in groups.json - defaulting to all TAP tests") - groups = {} + log.critical( + f"Group '{TAP_GROUP}' has no associated tests in groups.json. " + f"Refusing to fall back to running all TAP tests — aborting. " + f"Register tests for this group in test/tap/groups/groups.json, " + f"or unset TAP_GROUP to run the full suite intentionally." + ) + sys.exit(1) else: - log.warning(f"No groups.json found - group '{TAP_GROUP}' will default to all TAP tests") - groups = {} + log.critical( + f"No groups.json found but TAP_GROUP='{TAP_GROUP}' is set. " + f"Refusing to fall back to running all TAP tests — aborting." + ) + sys.exit(1) else: # No TAP_GROUP specified - load all groups for regular group membership checking log.info("No TAP_GROUP specified - loading all groups for membership checking")