From 5f5e402a32e0dc8bd64b76ffbea7c09591be01f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 11 Jun 2019 00:09:26 +0300 Subject: [PATCH] Reconnect before find_field in mysqlmon_rejoin_manual This appears to fix the test failure but the reason why it worked before still remains a mystery. --- maxscale-system-test/mysqlmon_rejoin_manual.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/maxscale-system-test/mysqlmon_rejoin_manual.cpp b/maxscale-system-test/mysqlmon_rejoin_manual.cpp index ec6ff9ba9..15b8ece6b 100644 --- a/maxscale-system-test/mysqlmon_rejoin_manual.cpp +++ b/maxscale-system-test/mysqlmon_rejoin_manual.cpp @@ -70,6 +70,7 @@ int main(int argc, char** argv) get_output(test); string gtid_old_master; + test.repl->connect(); if (find_field(test.repl->nodes[master_index], GTID_QUERY, GTID_FIELD, result_tmp) == 0) { gtid_old_master = result_tmp; @@ -119,9 +120,10 @@ int main(int argc, char** argv) test.maxscales->wait_for_monitor(); get_output(test); char result[100]; + test.repl->connect(); if (find_field(conn, sstatus_query.c_str(), "Master_Host", result) == 0) { - test.expect(strcmp(result, test.repl->IP[0]) == 0, + test.expect(strcmp(result, test.repl->IP[0]) == 0, "server3 did not rejoin the cluster (%s != %s).", result, test.repl->IP[0]); } else