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

@ -17,7 +17,7 @@ int main(int argc, char *argv[])
Test->set_timeout(10);
Test->connect_maxscale();
Test->maxscales->connect_maxscale(0);
int iterations = Test->smoke ? 100000 : 1000000;
int r = Test->smoke ? 1 : 3;
@ -26,17 +26,17 @@ int main(int argc, char *argv[])
for (int i = 0; i < iterations; i++)
{
Test->set_timeout(10);
Test->try_query(Test->routers[j], (char*) "set autocommit=0;");
Test->try_query(Test->routers[j], (char*) "select 1;");
Test->try_query(Test->routers[j], (char*) "set autocommit=1;");
Test->try_query(Test->routers[j], (char*) "select 2;");
Test->try_query(Test->maxscales->routers[0][j], (char*) "set autocommit=0;");
Test->try_query(Test->maxscales->routers[0][j], (char*) "select 1;");
Test->try_query(Test->maxscales->routers[0][j], (char*) "set autocommit=1;");
Test->try_query(Test->maxscales->routers[0][j], (char*) "select 2;");
if ((i / 1000) * 1000 == i)
{
Test->tprintf("i=%d\n", i);
}
}
maxscale_mem = Test->get_maxscale_memsize();
maxscale_mem = Test->maxscales->get_maxscale_memsize(0);
Test->tprintf("Maxscale process uses %lu KBytes\n", maxscale_mem);
if (maxscale_mem > 2000000)
@ -45,9 +45,8 @@ int main(int argc, char *argv[])
}
}
Test->check_maxscale_alive();
Test->check_maxscale_alive(0);
int rval = Test->global_result;
delete Test;
return rval;
}