Reduce test verbosity on failure
The tests should stop attempting any queries after the first failure.
This commit is contained in:
@ -17,11 +17,11 @@ int main(int argc, char *argv[])
|
|||||||
TestConnections test(argc, argv);
|
TestConnections test(argc, argv);
|
||||||
vector<thread> threads;
|
vector<thread> threads;
|
||||||
|
|
||||||
for (int i = 0; i < 20; i++)
|
for (int i = 0; i < 20 && test.global_result == 0; i++)
|
||||||
{
|
{
|
||||||
threads.emplace_back([&, i]()
|
threads.emplace_back([&, i]()
|
||||||
{
|
{
|
||||||
while (running)
|
while (running && test.global_result == 0)
|
||||||
{
|
{
|
||||||
MYSQL* c = test.maxscales->open_rwsplit_connection();
|
MYSQL* c = test.maxscales->open_rwsplit_connection();
|
||||||
|
|
||||||
|
|||||||
@ -181,7 +181,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
get_global_status_allnodes(&selects[0], &inserts[0], Test->repl, silent);
|
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->set_timeout(20);
|
||||||
Test->try_query(Test->maxscales->conn_rwsplit[0], "select * from t1;");
|
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);
|
get_global_status_allnodes(&selects[0], &inserts[0], Test->repl, silent);
|
||||||
Test->tprintf("Doing 100 inserts\n");
|
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->set_timeout(20);
|
||||||
Test->try_query(Test->maxscales->conn_rwsplit[0], "insert into t1 values(1);");
|
Test->try_query(Test->maxscales->conn_rwsplit[0], "insert into t1 values(1);");
|
||||||
|
|||||||
@ -23,7 +23,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
for (int j = 0; j < r; j++)
|
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->set_timeout(10);
|
||||||
Test->try_query(Test->maxscales->routers[0][j], (char*) "set autocommit=0;");
|
Test->try_query(Test->maxscales->routers[0][j], (char*) "set autocommit=0;");
|
||||||
|
|||||||
Reference in New Issue
Block a user