From 9e084753b0a4bd141e92bed66e58637a8f91f7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 1 Aug 2018 15:59:30 +0300 Subject: [PATCH] Reduce test verbosity on failure The tests should stop attempting any queries after the first failure. --- maxscale-system-test/mxs1985_kill_hang.cpp | 4 ++-- maxscale-system-test/rw_select_insert.cpp | 4 ++-- maxscale-system-test/ses_bigmem.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/maxscale-system-test/mxs1985_kill_hang.cpp b/maxscale-system-test/mxs1985_kill_hang.cpp index 2ee70392e..f383190d7 100644 --- a/maxscale-system-test/mxs1985_kill_hang.cpp +++ b/maxscale-system-test/mxs1985_kill_hang.cpp @@ -17,11 +17,11 @@ int main(int argc, char *argv[]) TestConnections test(argc, argv); vector threads; - for (int i = 0; i < 20; i++) + for (int i = 0; i < 20 && test.global_result == 0; i++) { threads.emplace_back([&, i]() { - while (running) + while (running && test.global_result == 0) { MYSQL* c = test.maxscales->open_rwsplit_connection(); diff --git a/maxscale-system-test/rw_select_insert.cpp b/maxscale-system-test/rw_select_insert.cpp index 1935c4499..21d8f9140 100644 --- a/maxscale-system-test/rw_select_insert.cpp +++ b/maxscale-system-test/rw_select_insert.cpp @@ -181,7 +181,7 @@ int main(int argc, char *argv[]) get_global_status_allnodes(&selects[0], &inserts[0], Test->repl, silent); - for (i = 0; i < 100; i++) + for (i = 0; i < 100 && Test->global_result == 0; i++) { Test->set_timeout(20); Test->try_query(Test->maxscales->conn_rwsplit[0], "select * from t1;"); @@ -200,7 +200,7 @@ int main(int argc, char *argv[]) get_global_status_allnodes(&selects[0], &inserts[0], Test->repl, silent); Test->tprintf("Doing 100 inserts\n"); - for (i = 0; i < 100; i++) + for (i = 0; i < 100 && Test->global_result == 0; i++) { Test->set_timeout(20); Test->try_query(Test->maxscales->conn_rwsplit[0], "insert into t1 values(1);"); diff --git a/maxscale-system-test/ses_bigmem.cpp b/maxscale-system-test/ses_bigmem.cpp index e218908e6..14b3d093f 100644 --- a/maxscale-system-test/ses_bigmem.cpp +++ b/maxscale-system-test/ses_bigmem.cpp @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) for (int j = 0; j < r; j++) { - for (int i = 0; i < iterations; i++) + for (int i = 0; i < iterations && Test->global_result == 0; i++) { Test->set_timeout(10); Test->try_query(Test->maxscales->routers[0][j], (char*) "set autocommit=0;");