From 8a8c45dada88e2af7fe0dcd3202d0dc8109219e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Thu, 8 Dec 2022 20:46:26 +0100 Subject: [PATCH] Fix potential race condition on test 'eof_fast_forward-t' --- .../deprecate_eof_support/eof_fast_forward-t.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/tap/tests_with_deps/deprecate_eof_support/eof_fast_forward-t.cpp b/test/tap/tests_with_deps/deprecate_eof_support/eof_fast_forward-t.cpp index 0e7928812..6931f811c 100644 --- a/test/tap/tests_with_deps/deprecate_eof_support/eof_fast_forward-t.cpp +++ b/test/tap/tests_with_deps/deprecate_eof_support/eof_fast_forward-t.cpp @@ -246,6 +246,9 @@ int main(int argc, char** argv) { MYSQL_QUERY(proxy, "/* create_new_connection=1 */ DO 1"); } + // Impose a timeout to avoid race conditions + wait_for_backend_conns(admin, "ConnFree", 50, 1); + // Check there are 'N' backend connections uint32_t cur_free_conns = 0; int get_conns_err = get_cur_backend_conns(admin, "ConnFree", cur_free_conns);