Merge 2.1 in 2.2

Merge 2.1 in 2.2
This commit is contained in:
MassimilianoPinto
2017-11-29 11:30:33 +01:00
parent ba22e3b1db
commit 8a10b72e4d
8 changed files with 195 additions and 25 deletions

View File

@ -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

View File

@ -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();