From 7ecc70fd5d0088342ebf3d91f457ef2055e623d0 Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Mon, 15 Apr 2019 13:01:03 +0300 Subject: [PATCH] Move versions checks after nodes checks In case when nodes/servers/replication/etc in backend are broken test can not get proper version information and exits without doing anything. To avoid it, test first checks backend, call fix_replication() if needed and only after that tris to check if backend version is ok for this test --- maxscale-system-test/testconnections.cpp | 48 ++++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/maxscale-system-test/testconnections.cpp b/maxscale-system-test/testconnections.cpp index 2e82d6b4d..45659c4c7 100644 --- a/maxscale-system-test/testconnections.cpp +++ b/maxscale-system-test/testconnections.cpp @@ -363,6 +363,30 @@ TestConnections::TestConnections(int argc, char *argv[]): } } + if ((restart_galera) && (galera)) + { + galera->stop_nodes(); + galera->start_replication(); + } + + if (maxscale::check_nodes) + { + if (repl) + { + if (!repl->fix_replication() ) + { + exit(BROKEN_VM_FAUILT); + } + } + if (galera) + { + if (!galera->fix_replication()) + { + exit(BROKEN_VM_FAUILT); + } + } + } + if (repl) { if (maxscale::required_repl_version.length()) @@ -399,30 +423,6 @@ TestConnections::TestConnections(int argc, char *argv[]): } } - if ((restart_galera) && (galera)) - { - galera->stop_nodes(); - galera->start_replication(); - } - - if (maxscale::check_nodes) - { - if (repl) - { - if (!repl->fix_replication() ) - { - exit(BROKEN_VM_FAUILT); - } - } - if (galera) - { - if (!galera->fix_replication()) - { - exit(BROKEN_VM_FAUILT); - } - } - } - if (maxscale_init) { init_maxscales();