summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2020-02-12 10:32:30 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2020-02-12 10:32:30 +0200
commita6b92690e612bf88b2c042b33878c04fec5c50ed (patch)
tree8fea99b7268b8bbc70bd1e4598d0922a209c0e09
parentf6663bfbd3f1dd321cd7d53291e3fa08a190ab2f (diff)
downloadmariadb-git-bb-10.2-MDEV-21446.tar.gz
MDEV-21556 : galera.lp1376747-4 MTR failed: Result length mismatchbb-10.2-MDEV-21446
Add proper wait condition instead of sleeps.
-rw-r--r--mysql-test/suite/galera/t/lp1376747-4.test17
1 files 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;