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

@ -36,7 +36,7 @@ int main(int argc, char *argv[])
Test->tprintf("Creating %d connections to RWSplit router\n", TestConnNum);
for (i = 0; i < TestConnNum; i++)
{
conn[i] = Test->open_rwsplit_connection();
conn[i] = Test->maxscales->open_rwsplit_connection(0);
}
Test->tprintf("Waiting 5 seconds\n");
sleep(5);
@ -46,7 +46,7 @@ int main(int argc, char *argv[])
int TotalConn = 0;
Test->tprintf("Checking connections to Master: should be %d\n", TestConnNum);
conn_num = get_conn_num(Test->repl->nodes[0], Test->maxscale_ip(), Test->maxscale_hostname, (char *) "test");
conn_num = get_conn_num(Test->repl->nodes[0], Test->maxscales->ip(0), Test->maxscales->hostname[0], (char *) "test");
if (conn_num != TestConnNum)
{
Test->add_result(1, "number of connections to Master is %d\n", conn_num);
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
Test->tprintf("Checking connections to each node\n");
for (int i = 1; i < Test->repl->N; i++)
{
conn_num = get_conn_num(Test->repl->nodes[i], Test->maxscale_ip(), Test->maxscale_hostname, (char *) "test");
conn_num = get_conn_num(Test->repl->nodes[i], Test->maxscales->ip(0), Test->maxscales->hostname[0], (char *) "test");
TotalConn += conn_num;
Test->tprintf("Connections to node %d (%s):\t%d\n", i, Test->repl->IP[i], conn_num);
if ((conn_num > ConnCell) || (conn_num < ConnFloor))