revision-id: 83341b3701a6d2280944963160199abb259ac463 (mariadb-10.1.37-13-g83341b3701a) parent(s): de0eeb800e182bb8d2533500242a67fdde4d8ffe author: Jan Lindström committer: Jan Lindström timestamp: 2018-11-19 13:11:01 +0200 message: MDEV-17061: Test failure on galera.galera_gc_fc_limit Add proper wait condition and remove sleeps. --- mysql-test/suite/galera/disabled.def | 1 - mysql-test/suite/galera/r/galera_gcs_fc_limit.result | 12 ++++++------ mysql-test/suite/galera/t/galera_gcs_fc_limit.test | 19 ++++++++----------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 94256dd88d7..bce5fc1e834 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -29,7 +29,6 @@ MW-416 : MDEV-13549 Galera test failures MW-388 : MDEV-13549 Galera test failures galera_sst_mysqldump_with_key : MDEV-16890 Galera test failure galera_binlog_stmt_autoinc: MDEV-17106 Test failure on galera.galera_binlog_stmt_autoinc -galera_gc_fc_limit : MDEV-17061 Test failure on galera.galera_gc_fc_limit galera_as_slave_replication_budle : MDEV-15785 Test case galera_as_slave_replication_bundle caused debug assertion galera_wan : MDEV-17259: Test failure on galera.galera_wan galera_pc_ignore_sb : MDEV-17357 Test failure on galera.galera_pc_ignore_sb diff --git a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result index 9463b5f8eef..883d79e2e3f 100644 --- a/mysql-test/suite/galera/r/galera_gcs_fc_limit.result +++ b/mysql-test/suite/galera/r/galera_gcs_fc_limit.result @@ -1,17 +1,17 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); -SELECT COUNT(*) = 1 FROM t1; -COUNT(*) = 1 +SELECT COUNT(*) FROM t1; +COUNT(*) 1 SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; LOCK TABLE t1 WRITE; INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); INSERT INTO t1 VALUES (4); -INSERT INTO t1 VALUES (5); +INSERT INTO t1 VALUES (5);; UNLOCK TABLES; INSERT INTO t1 VALUES (6); -SELECT COUNT(*) = 6 FROM t1; -COUNT(*) = 6 -1 +SELECT COUNT(*) FROM t1; +COUNT(*) +6 DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test index 61576a39316..af0fc27d927 100644 --- a/mysql-test/suite/galera/t/galera_gcs_fc_limit.test +++ b/mysql-test/suite/galera/t/galera_gcs_fc_limit.test @@ -9,8 +9,9 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); --connection node_2 -SELECT COUNT(*) = 1 FROM t1; ---sleep 1 +--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1' +--source include/wait_condition.inc +SELECT COUNT(*) FROM t1; --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; @@ -19,18 +20,11 @@ SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1'; LOCK TABLE t1 WRITE; --connection node_1 ---sleep 1 INSERT INTO t1 VALUES (2); ---sleep 2 INSERT INTO t1 VALUES (3); ---sleep 2 INSERT INTO t1 VALUES (4); ---sleep 2 - # This query will hang because flow control will kick in ---send -INSERT INTO t1 VALUES (5); ---sleep 2 +--send INSERT INTO t1 VALUES (5); --let $galera_connection_name = node_1a --let $galera_server_number = 1 @@ -50,7 +44,10 @@ INSERT INTO t1 VALUES (6); --connection node_2 # Replication catches up and continues normally -SELECT COUNT(*) = 6 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 6 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) FROM t1; --disable_query_log --eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';