MXS-1476: Stop nodes instead of blocking them
This should actually disrupt the Galera cluster instead of just temporarily disabling it.
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user