From f8674517543a44381b339c6e973bf7549af61784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Thu, 16 May 2024 19:51:14 +0200 Subject: [PATCH] Increase tolerance of 'test_cacert_load_and_verify_duration-t' for ASAN builds --- test/tap/tests/test_cacert_load_and_verify_duration-t.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/tap/tests/test_cacert_load_and_verify_duration-t.cpp b/test/tap/tests/test_cacert_load_and_verify_duration-t.cpp index 19da85d3d..f75b913ee 100644 --- a/test/tap/tests/test_cacert_load_and_verify_duration-t.cpp +++ b/test/tap/tests/test_cacert_load_and_verify_duration-t.cpp @@ -24,6 +24,10 @@ int main() { plan(1); + int32_t WASAN = get_env_int("WITHASAN", 0); + // Double the value of previously failed ASAN run: '89415ms' + int32_t EXP_TIME = WASAN == 0 ? 20000 : 180000; + MYSQL* proxysql_admin = mysql_init(NULL); // Initialize connection @@ -57,7 +61,7 @@ int main() { if (start_pos != std::string::npos && end_pos != std::string::npos) { uint64_t time = std::stoull(msg.substr(start_pos + 5, end_pos - (start_pos + 5))); - ok(time < 20000, "Total duration is '%lu ms' should be less than 20 Seconds", time); + ok(time < EXP_TIME, "Total duration is '%lu ms' should be less than %d Seconds", time, EXP_TIME/1000); } } mysql_close(proxysql_admin);