summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseppo <seppo.jaakola@iki.fi>2020-03-20 15:38:37 +0200
committerGitHub <noreply@github.com>2020-03-20 15:38:37 +0200
commitd529389358fb0c7f3e642d34d7fd84df307b9d29 (patch)
tree7f9771ec5cfc995a36dbf217af9641b851b6dd5e
parentec5e48be4bff1dde3812ab0c9d2b058aa37b59a3 (diff)
downloadmariadb-git-d529389358fb0c7f3e642d34d7fd84df307b9d29.tar.gz
MDEV-21979 Galera test sporadic failure on galera_3nodes.galera_pc_weight (#1473)
Forcing wait on nodes 2 and 3, to turn wsrep_ready to 'ON' before querying wsrep status variables. This guarantees that status reads don't come too early on these nodes
-rw-r--r--mysql-test/suite/galera_3nodes/r/galera_pc_weight.result2
-rw-r--r--mysql-test/suite/galera_3nodes/t/galera_pc_weight.test9
2 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
index 3ae983f9550..94ead54dfe0 100644
--- a/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
+++ b/mysql-test/suite/galera_3nodes/r/galera_pc_weight.result
@@ -87,6 +87,8 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
connection node_2;
connection node_3;
connection node_1;
+connection node_2;
+connection node_3;
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
index 729f14a731f..0e407e49aba 100644
--- a/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
+++ b/mysql-test/suite/galera_3nodes/t/galera_pc_weight.test
@@ -88,6 +88,15 @@ SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
--connection node_1
--source include/wait_condition.inc
+# wait until nodes 2 and 3 have declared ready state (can happen after cluster_size raaise)
+--connection node_2
+--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready'
+--source include/wait_condition.inc
+
+--connection node_3
+--source include/wait_condition.inc
+
+
# On all nodes, we now expect a Primary component of size 3, weight 3, Synced and ready
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_weight';