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

@ -19,15 +19,17 @@ int check_max_conn(int router, int max_conn, TestConnections * Test)
int i;
for (i = 0; i < max_conn; i++)
{
conn[i] = open_conn(Test->ports[router], Test->maxscale_IP, Test->maxscale_user, Test->maxscale_password,
conn[i] = open_conn(Test->maxscales->ports[0][router], Test->maxscales->IP[0], Test->maxscales->user_name,
Test->maxscales->password,
Test->ssl);
if (mysql_errno(conn[i]) != 0)
{
Test->add_result(1, "Connection %d failed, error is %s\n", i, mysql_error(conn[i]));
}
}
conn[max_conn] = open_conn(Test->ports[router], Test->maxscale_IP, Test->maxscale_user,
Test->maxscale_password, Test->ssl);
conn[max_conn] = open_conn(Test->maxscales->ports[0][router], Test->maxscales->IP[0],
Test->maxscales->user_name,
Test->maxscales->password, Test->ssl);
if (mysql_errno(conn[i]) != 1040)
{
Test->add_result(1, "Max_xonnections reached, but error is not 1040, it is %d %s\n", mysql_errno(conn[i]),
@ -52,9 +54,8 @@ int main(int argc, char *argv[])
sleep(10);
Test->check_maxscale_alive();
Test->check_maxscale_alive(0);
int rval = Test->global_result;
delete Test;
return rval;
}