From ddc06660a2450bbb997046cc20fcfdaafbce8b3d Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Sat, 21 Feb 2026 15:06:39 +0000 Subject: [PATCH] Integrate background noise into major TAP tests - test_admin_stats-t: Added Admin and Stats noise - pgsql-basic_tests-t: Added MySQL traffic and Prometheus noise - test_cluster_sync-t: Added Admin, Prometheus, and Stats noise - test_auth_methods-t: Added Admin and MySQL traffic noise --- test/tap/tests/pgsql-basic_tests-t.cpp | 4 ++++ test/tap/tests/test_admin_stats-t.cpp | 4 ++++ test/tap/tests/test_auth_methods-t.cpp | 4 ++++ test/tap/tests/test_cluster_sync-t.cpp | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/test/tap/tests/pgsql-basic_tests-t.cpp b/test/tap/tests/pgsql-basic_tests-t.cpp index 44a3e3422..9f7fb71e7 100644 --- a/test/tap/tests/pgsql-basic_tests-t.cpp +++ b/test/tap/tests/pgsql-basic_tests-t.cpp @@ -13,6 +13,7 @@ #include "command_line.h" #include "tap.h" #include "utils.h" +#include "noise_utils.h" #define PQEXEC(conn, query) ({PGresult* res = PQexec(conn, query); \ @@ -649,6 +650,9 @@ int main(int argc, char** argv) { if (cl.getEnv()) return exit_status(); + spawn_internal_noise(cl, internal_noise_mysql_traffic); + spawn_internal_noise(cl, internal_noise_prometheus_poller); + execute_tests(false); // without SSL execute_tests(true); // with SSL diff --git a/test/tap/tests/test_admin_stats-t.cpp b/test/tap/tests/test_admin_stats-t.cpp index 29ac4d0e4..949a3ad76 100644 --- a/test/tap/tests/test_admin_stats-t.cpp +++ b/test/tap/tests/test_admin_stats-t.cpp @@ -33,6 +33,7 @@ DELETE FROM history_mysql_status_variables; #include "tap.h" #include "command_line.h" #include "utils.h" +#include "noise_utils.h" using std::string; using std::to_string; @@ -82,6 +83,9 @@ int main(int argc, char** argv) { return -1; } + spawn_internal_noise(cl, internal_noise_admin_pinger); + spawn_internal_noise(cl, internal_noise_random_stats_poller); + /** @brief Minimum number of distinct variable_name strings in the history_mysql_status_variables_lookup table */ const int min_distinct_variable_names = 50; diff --git a/test/tap/tests/test_auth_methods-t.cpp b/test/tap/tests/test_auth_methods-t.cpp index ef5570dc3..e6db3f935 100644 --- a/test/tap/tests/test_auth_methods-t.cpp +++ b/test/tap/tests/test_auth_methods-t.cpp @@ -39,6 +39,7 @@ #include "command_line.h" #include "utils.h" #include "utils_auth.h" +#include "noise_utils.h" // Additional env variables uint32_t MYSQL8_HG = get_env_int("TAP_MYSQL8_BACKEND_HG", 30); @@ -1085,6 +1086,9 @@ int main(int argc, char** argv) { return EXIT_FAILURE; } + spawn_internal_noise(cl, internal_noise_admin_pinger); + spawn_internal_noise(cl, internal_noise_mysql_traffic); + MYSQL* mysql = mysql_init(NULL); if (!mysql_real_connect(mysql, cl.host, cl.mysql_username, cl.mysql_password, NULL, cl.mysql_port, NULL, 0)) { diff --git a/test/tap/tests/test_cluster_sync-t.cpp b/test/tap/tests/test_cluster_sync-t.cpp index ea4416f21..7e7845ae0 100644 --- a/test/tap/tests/test_cluster_sync-t.cpp +++ b/test/tap/tests/test_cluster_sync-t.cpp @@ -84,6 +84,7 @@ #include "tap.h" #include "command_line.h" #include "utils.h" +#include "noise_utils.h" #define MYSQL_QUERY__(mysql, query) \ do { \ @@ -1118,6 +1119,10 @@ int main(int, char**) { return EXIT_FAILURE; } + spawn_internal_noise(cl, internal_noise_admin_pinger); + spawn_internal_noise(cl, internal_noise_prometheus_poller); + spawn_internal_noise(cl, internal_noise_random_stats_poller); + const size_t dis_mod_checks = 7; const size_t ena_mod_checks = 5; const size_t sync_pls = module_sync_payloads.size();