diff --git a/maxscale-system-test/bug529.cpp b/maxscale-system-test/bug529.cpp index 3c21b8f3a..76306d490 100644 --- a/maxscale-system-test/bug529.cpp +++ b/maxscale-system-test/bug529.cpp @@ -212,8 +212,8 @@ int main(int argc, char *argv[]) } Test->stop_timeout(); - Test->tprintf("Sleeping 15 seconds\n"); - sleep(15); + Test->tprintf("Sleeping"); + sleep(5); for (i = 0; i < Test->repl->N; i++) { diff --git a/maxscale-system-test/bug547.cpp b/maxscale-system-test/bug547.cpp index aca5fbadf..4dfa5001b 100644 --- a/maxscale-system-test/bug547.cpp +++ b/maxscale-system-test/bug547.cpp @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) } Test->set_timeout(30); - sleep(15); + sleep(5); Test->set_timeout(30); Test->tprintf("Connecting to all MaxScale services, expecting error\n"); @@ -57,7 +57,6 @@ int main(int argc, char *argv[]) Test->repl->unblock_all_nodes(); Test->stop_timeout(); - sleep(15); Test->check_log_err(0, "fatal signal 11", false); Test->check_log_err(0, "Failed to create new router session for service", true); diff --git a/maxscale-system-test/bug658.cpp b/maxscale-system-test/bug658.cpp index 94314ab19..880c787d8 100644 --- a/maxscale-system-test/bug658.cpp +++ b/maxscale-system-test/bug658.cpp @@ -28,81 +28,24 @@ Added a check for server status before routing the query. Now if the server is d int main(int argc, char *argv[]) { TestConnections * Test = new TestConnections(argc, argv); - Test->set_timeout(40); - int i; + Test->set_timeout(60); - Test->tprintf("Connecting to Maxscale %s\n", Test->maxscales->IP[0]); + Test->tprintf("Connecting to Maxscale %s", Test->maxscales->IP[0]); Test->maxscales->connect_maxscale(0); - printf("Setup firewall to block mysql on master\n"); - fflush(stdout); + printf("Setup firewall to block mysql on master"); Test->repl->block_node(0); - sleep(1); - - Test->tprintf("Trying query to RWSplit, expecting failure, but not a crash\n"); - execute_query(Test->maxscales->conn_rwsplit[0], (char *) "show processlist;"); - fflush(stdout); - Test->tprintf("Trying query to ReadConn master, expecting failure, but not a crash\n"); - execute_query(Test->maxscales->conn_master[0], (char *) "show processlist;"); - fflush(stdout); - Test->tprintf("Trying query to ReadConn slave, expecting failure, but not a crash\n"); - execute_query(Test->maxscales->conn_slave[0], (char *) "show processlist;"); - fflush(stdout); - - sleep(1); + Test->tprintf("Trying query to RWSplit, ReadConn master and ReadConn slave: expecting failure, but not a crash"); + execute_query(Test->maxscales->conn_rwsplit[0], "show processlist;"); + execute_query(Test->maxscales->conn_master[0], "show processlist;"); + execute_query(Test->maxscales->conn_slave[0], "show processlist;"); + Test->maxscales->close_maxscale_connections(0); + // Wait three monitor intervals to allow the monitor to detect that the server is up Test->repl->unblock_node(0); - sleep(10); + sleep(3); - Test->maxscales->close_maxscale_connections(0); - - Test->tprintf("Checking Maxscale is alive\n"); - Test->check_maxscale_alive(0); - - Test->set_timeout(20); - - Test->tprintf("Connecting to Maxscale %s to check its behaviour in case of blocking all bacxkends\n", - Test->maxscales->IP[0]); - Test->maxscales->connect_maxscale(0); - - if (!Test->smoke) - { - for (i = 0; i < Test->repl->N; i++) - { - Test->tprintf("Setup firewall to block mysql on node %d\n", i); - Test->repl->block_node(i); - fflush(stdout); - } - sleep(1); - - Test->tprintf("Trying query to RWSplit, expecting failure, but not a crash\n"); - execute_query(Test->maxscales->conn_rwsplit[0], (char *) "show processlist;"); - fflush(stdout); - Test->tprintf("Trying query to ReadConn master, expecting failure, but not a crash\n"); - execute_query(Test->maxscales->conn_master[0], (char *) "show processlist;"); - fflush(stdout); - Test->tprintf("Trying query to ReadConn slave, expecting failure, but not a crash\n"); - execute_query(Test->maxscales->conn_slave[0], (char *) "show processlist;"); - fflush(stdout); - - sleep(1); - - for (i = 0; i < Test->repl->N; i++) - { - Test->tprintf("Setup firewall back to allow mysql on node %d\n", i); - Test->repl->unblock_node(i); - fflush(stdout); - } - } - Test->stop_timeout(); - Test->tprintf("Sleeping 20 seconds\n"); - sleep(20); - - Test->set_timeout(20); - - Test->maxscales->close_maxscale_connections(0); - Test->tprintf("Checking Maxscale is alive\n"); Test->check_maxscale_alive(0); int rval = Test->global_result; diff --git a/maxscale-system-test/bug662.cpp b/maxscale-system-test/bug662.cpp index 3e7c7c632..025833c8f 100644 --- a/maxscale-system-test/bug662.cpp +++ b/maxscale-system-test/bug662.cpp @@ -13,20 +13,13 @@ int main(int argc, char *argv[]) { TestConnections * Test = new TestConnections(argc, argv); - int i; - - Test->tprintf("Connecting to Maxscale %s\n", Test->maxscales->IP[0]); - - Test->tprintf("Connecting to Maxscale %s to check its behaviour in case of blocking all backends\n", - Test->maxscales->IP[0]); Test->maxscales->connect_maxscale(0); - for (i = 0; i < Test->repl->N; i++) + for (int i = 0; i < Test->repl->N; i++) { Test->set_timeout(30); Test->tprintf("Setup firewall to block mysql on node %d\n", i); Test->repl->block_node(i); - fflush(stdout); } Test->set_timeout(200); @@ -36,20 +29,16 @@ int main(int argc, char *argv[]) Test->tprintf("Checking if MaxScale is alive by connecting to MaxAdmin\n"); Test->add_result(Test->maxscales->execute_maxadmin_command(0, (char* ) "show servers"), "Maxadmin execution failed.\n"); - for (i = 0; i < Test->repl->N; i++) + for (int i = 0; i < Test->repl->N; i++) { Test->set_timeout(30); Test->tprintf("Setup firewall back to allow mysql on node %d\n", i); Test->repl->unblock_node(i); - fflush(stdout); } - Test->stop_timeout(); - Test->tprintf("Sleeping 30 seconds\n"); - sleep(30); + sleep(3); Test->set_timeout(30); - Test->tprintf("Checking Maxscale is alive\n"); Test->check_maxscale_alive(0); int rval = Test->global_result; diff --git a/maxscale-system-test/bug676.cpp b/maxscale-system-test/bug676.cpp index 8e247c01c..088e9a5bd 100644 --- a/maxscale-system-test/bug676.cpp +++ b/maxscale-system-test/bug676.cpp @@ -26,7 +26,7 @@ int main(int argc, char *argv[]) test.stop_timeout(); test.tprintf("Waiting until the monitor picks a new master"); - sleep(20); + sleep(5); test.set_timeout(30);