Wait for monitor in mxs1476
Use Maxscales::wait_for_monitor instead of hard-coded sleeps. This should make testing faster, more accurate as well as more robust.
This commit is contained in:
parent
9d961ece3a
commit
5438140e33
@ -23,14 +23,14 @@ void do_test(TestConnections& test, int master, int slave)
|
||||
|
||||
test.tprintf("Stop a slave node and perform an insert");
|
||||
test.galera->block_node(slave);
|
||||
sleep(10);
|
||||
test.maxscales->wait_for_monitor();
|
||||
list_servers(test);
|
||||
|
||||
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->unblock_node(slave);
|
||||
sleep(10);
|
||||
test.maxscales->wait_for_monitor();
|
||||
list_servers(test);
|
||||
|
||||
test.try_query(test.maxscales->conn_rwsplit[0], "INSERT INTO test.t1 VALUES (1)");
|
||||
@ -38,7 +38,7 @@ void do_test(TestConnections& test, int master, int slave)
|
||||
|
||||
test.tprintf("Stop the master node and perform an insert");
|
||||
test.galera->block_node(master);
|
||||
sleep(10);
|
||||
test.maxscales->wait_for_monitor();
|
||||
list_servers(test);
|
||||
|
||||
test.maxscales->connect_maxscale(0);
|
||||
@ -46,7 +46,7 @@ void do_test(TestConnections& test, int master, int slave)
|
||||
|
||||
test.tprintf("Start the master node and perform another insert (expecting failure)");
|
||||
test.galera->unblock_node(master);
|
||||
sleep(10);
|
||||
test.maxscales->wait_for_monitor();
|
||||
list_servers(test);
|
||||
|
||||
test.add_result(execute_query_silent(test.maxscales->conn_rwsplit[0], "INSERT INTO test.t1 VALUES (1)") == 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user