From d231dc8f59221166eea13a6580bbcc8c0c755855 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub <wlad@montyprogram.com> Date: Thu, 3 May 2012 18:58:48 +0200 Subject: [PATCH] Fix (hopefully) a race condition in a test. Wait until killed connection is gone. --- mysql-test/t/aborted_clients.test | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mysql-test/t/aborted_clients.test b/mysql-test/t/aborted_clients.test index aa278554c8..fafcfb6b3e 100644 --- a/mysql-test/t/aborted_clients.test +++ b/mysql-test/t/aborted_clients.test @@ -3,24 +3,26 @@ # status variable, but KILL connection does -- source include/not_embedded.inc +-- source include/count_sessions.inc FLUSH STATUS; # Connect/Disconnect look that aborted_clients stays 0 connect (con1,localhost,root,,); disconnect con1; connection default; +-- source include/wait_until_count_sessions.inc # Check that there is 0 aborted clients so far SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients'; # Kill a connection, check that aborted_clients is incremented -connect(con2,localhost,root,,); +connect(con2,localhost,root,,); --disable_reconnect --error ER_CONNECTION_KILLED KILL CONNECTION_ID(); disconnect con2; connection default; +-- source include/wait_until_count_sessions.inc # aborted clients must be 1 now SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='aborted_clients'; FLUSH STATUS; - -- 2.30.9