From a6b92690e612bf88b2c042b33878c04fec5c50ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 12 Feb 2020 10:32:30 +0200 Subject: MDEV-21556 : galera.lp1376747-4 MTR failed: Result length mismatch Add proper wait condition instead of sleeps. --- mysql-test/suite/galera/t/lp1376747-4.test | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/mysql-test/suite/galera/t/lp1376747-4.test b/mysql-test/suite/galera/t/lp1376747-4.test index 0c707d6d681..6ae89fe9df4 100644 --- a/mysql-test/suite/galera/t/lp1376747-4.test +++ b/mysql-test/suite/galera/t/lp1376747-4.test @@ -27,25 +27,24 @@ INSERT INTO t1 VALUES (2,3); --connection node_2a SET session wsrep_sync_wait=0; SET session wsrep_causal_reads=OFF; + SHOW CREATE TABLE t1; ---sleep 1 --send FLUSH TABLES t1 WITH READ LOCK; --connection node_2 -# let the flush table wait in pause state before we unlock -# table otherwise there is window where-in flush table is -# yet to wait in pause and unlock allows alter table to proceed. -# this is because send in asynchronous. ---sleep 3 -# this will release existing lock but will not resume -# the cluster as there is new FTRL that is still pausing it. +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE 'committed%'; +--source include/wait_condition.inc + UNLOCK TABLES; SHOW CREATE TABLE t1; --connection node_2a --reap UNLOCK TABLES; ---sleep 2 + +--let $wait_condition = SELECT COUNT(*) = 2 FROM t1; +--source include/wait_condition.inc + SHOW CREATE TABLE t1; SELECT * from t1; -- cgit v1.2.1