From c1405bb493f4a90081492a46d83a0212a954fd05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 21 Dec 2017 08:33:16 +0200 Subject: [PATCH] Only block nodes in mxs1476 This is less of a disruption to the whole Galera cluster, which appears to go non-primary if the nodes are stopped instead of blocked. --- maxscale-system-test/mariadb_nodes.h | 2 +- maxscale-system-test/mxs1476.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/maxscale-system-test/mariadb_nodes.h b/maxscale-system-test/mariadb_nodes.h index 8df54b373..1cf00c1ae 100644 --- a/maxscale-system-test/mariadb_nodes.h +++ b/maxscale-system-test/mariadb_nodes.h @@ -259,7 +259,7 @@ public: * @param param command line parameters for DB server start command * @return 0 if success */ - int start_node(int node, const char* param); + int start_node(int node, const char* param = ""); /** * @brief Check if all slaves have "Slave_IO_Running" set to "Yes" and master has N-1 slaves diff --git a/maxscale-system-test/mxs1476.cpp b/maxscale-system-test/mxs1476.cpp index 8dc1e367d..f42cf3158 100644 --- a/maxscale-system-test/mxs1476.cpp +++ b/maxscale-system-test/mxs1476.cpp @@ -14,24 +14,24 @@ void do_test(TestConnections& test, int master, int slave) test.try_query(test.maxscales->conn_rwsplit[0], "INSERT INTO test.t1 VALUES (1)"); test.tprintf("Stop a slave node and perform an insert"); - test.galera->stop_node(slave); + test.galera->block_node(slave); sleep(5); test.try_query(test.maxscales->conn_rwsplit[0], "INSERT INTO test.t1 VALUES (1)"); test.tprintf("Start the slave node and perform another insert"); - test.galera->start_node(slave, (char*)""); + test.galera->unblock_node(slave); sleep(5); test.try_query(test.maxscales->conn_rwsplit[0], "INSERT INTO test.t1 VALUES (1)"); test.maxscales->close_maxscale_connections(0); test.tprintf("Stop the master node and perform an insert"); - test.galera->stop_node(master); + test.galera->block_node(master); sleep(5); test.maxscales->connect_maxscale(0); test.try_query(test.maxscales->conn_rwsplit[0], "INSERT INTO test.t1 VALUES (1)"); test.tprintf("Start the master node and perform another insert (expecting failure)"); - test.galera->start_node(master, (char*)""); + test.galera->unblock_node(master); sleep(5); test.add_result(execute_query_silent(test.maxscales->conn_rwsplit[0], "INSERT INTO test.t1 VALUES (1)") == 0, "Query should fail"); @@ -57,8 +57,8 @@ int main(int argc, char** argv) do_test(test, 0, 1); - test.galera->start_node(2, (char *) ""); - test.galera->start_node(3, (char *) ""); + test.galera->start_node(2); + test.galera->start_node(3); test.galera->fix_replication(); return test.global_result; }