Remove unnecessary sleeps from tests

Removed unnecessary sleeps and replaced sleeps with wait_for_monitor in
some older tests. Also removed the odd arrangement of arrays in
server_weight.
This commit is contained in:
Markus Mäkelä
2018-11-18 22:39:41 +02:00
parent 47092ed18a
commit fd3a42ceb6
4 changed files with 10 additions and 20 deletions

View File

@ -21,7 +21,7 @@ int main(int argc, char* argv[])
printf("Connecting to RWSplit");
test.set_timeout(60);
test.add_result(test.maxscales->connect_rwsplit(0), "Error connection to RWSplit! Exiting");
sleep(5);
test.maxscales->wait_for_monitor();
test.tprintf("Checking current slave");
int res = 0;
@ -35,7 +35,7 @@ int main(int argc, char* argv[])
test.tprintf("Waiting for MaxScale to find a new slave");
test.stop_timeout();
sleep(10);
test.maxscales->wait_for_monitor();
test.set_timeout(20);
int current_slave = test.find_connected_slave(0, &res);