From d69a36b4dda1ebb0ce06a98ea89417acc37f93be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 24 Nov 2017 14:14:55 +0200 Subject: [PATCH] MXS-1476: Stop nodes instead of blocking them This should actually disrupt the Galera cluster instead of just temporarily disabling it. --- maxscale-system-test/mariadb_nodes.h | 2 +- maxscale-system-test/mxs1476.cpp | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/maxscale-system-test/mariadb_nodes.h b/maxscale-system-test/mariadb_nodes.h index c5d4d1ecf..cd4f8edb8 100644 --- a/maxscale-system-test/mariadb_nodes.h +++ b/maxscale-system-test/mariadb_nodes.h @@ -291,7 +291,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 node via ssh and restart it if it is not resposible diff --git a/maxscale-system-test/mxs1476.cpp b/maxscale-system-test/mxs1476.cpp index 7cca5a558..65ae63121 100644 --- a/maxscale-system-test/mxs1476.cpp +++ b/maxscale-system-test/mxs1476.cpp @@ -13,25 +13,25 @@ void do_test(TestConnections& test, int master, int slave) test.try_query(test.conn_rwsplit, "CREATE TABLE test.t1 (id int)"); test.try_query(test.conn_rwsplit, "INSERT INTO test.t1 VALUES (1)"); - test.tprintf("Block a slave node and perform an insert"); - test.galera->block_node(slave); + test.tprintf("Stop a slave node and perform an insert"); + test.galera->stop_node(slave); sleep(5); test.try_query(test.conn_rwsplit, "INSERT INTO test.t1 VALUES (1)"); - test.tprintf("Unblock the slave node and perform another insert"); - test.galera->unblock_node(slave); + test.tprintf("Start the slave node and perform another insert"); + test.galera->start_node(slave); sleep(5); test.try_query(test.conn_rwsplit, "INSERT INTO test.t1 VALUES (1)"); test.close_maxscale_connections(); - test.tprintf("Block the master node and perform an insert"); - test.galera->block_node(master); + test.tprintf("Stop the master node and perform an insert"); + test.galera->stop_node(master); sleep(5); test.connect_maxscale(); test.try_query(test.conn_rwsplit, "INSERT INTO test.t1 VALUES (1)"); - test.tprintf("Unblock the master node and perform another insert (expecting failure)"); - test.galera->unblock_node(master); + test.tprintf("Start the master node and perform another insert (expecting failure)"); + test.galera->start_node(master); sleep(5); test.add_result(execute_query_silent(test.conn_rwsplit, "INSERT INTO test.t1 VALUES (1)") == 0, "Query should fail"); test.close_maxscale_connections();