refactored tests (#147)

This commit is contained in:
Timofey Turenko
2017-12-08 12:23:04 +02:00
committed by GitHub
parent c6daf8c26b
commit 3c88bf1ec6
253 changed files with 5265 additions and 3649 deletions

View File

@ -89,7 +89,7 @@ int main(int argc, char *argv[])
Test->set_timeout(10);
Test->tprintf("Connecting to all MaxScale services\n");
Test->add_result(Test->connect_maxscale(), "Can not connect to Maxscale\n");
Test->add_result(Test->maxscales->connect_maxscale(0), "Can not connect to Maxscale\n");
Test->tprintf("executing show status %d times\n", iterations);
@ -97,25 +97,25 @@ int main(int argc, char *argv[])
for (i = 0; i < iterations; i++)
{
Test->set_timeout(5);
Test->add_result(execute_query(Test->conn_rwsplit, (char *) "show status"),
Test->add_result(execute_query(Test->maxscales->conn_rwsplit[0], (char *) "show status"),
"Query %d agains RWSplit failed\n", i);
}
for (i = 0; i < iterations; i++)
{
Test->set_timeout(5);
Test->add_result(execute_query(Test->conn_slave, (char *) "show status"),
Test->add_result(execute_query(Test->maxscales->conn_slave[0], (char *) "show status"),
"Query %d agains ReadConn Slave failed\n", i);
}
for (i = 0; i < iterations; i++)
{
Test->set_timeout(5);
Test->add_result(execute_query(Test->conn_master, (char *) "show status"),
Test->add_result(execute_query(Test->maxscales->conn_master[0], (char *) "show status"),
"Query %d agains ReadConn Master failed\n", i);
}
Test->set_timeout(10);
Test->close_maxscale_connections();
Test->check_maxscale_alive();
Test->maxscales->close_maxscale_connections(0);
Test->check_maxscale_alive(0);
int rval = Test->global_result;
delete Test;
return rval;