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

@ -15,24 +15,24 @@ int main(int argc, char *argv[])
TestConnections * Test = new TestConnections(argc, argv);
Test->set_timeout(30);
Test->tprintf("Connecting to RWSplit %s\n", Test->maxscale_IP);
Test->connect_rwsplit();
Test->tprintf("Connecting to RWSplit %s\n", Test->maxscales->IP[0]);
Test->maxscales->connect_rwsplit(0);
Test->tprintf("Setup firewall to block mysql on master\n");
Test->repl->block_node(0);
//printf("Trying query to RWSplit, expecting failure, but not a crash\n"); fflush(stdout);
//execute_query(Test->conn_rwsplit, (char *) "show processlist;");
execute_maxadmin_command_print(Test->maxscale_IP, (char *) "admin", Test->maxadmin_password,
//execute_query(Test->maxscales->conn_rwsplit[0], (char *) "show processlist;");
execute_maxadmin_command_print(Test->maxscales->IP[0], (char *) "admin", Test->maxscales->maxadmin_password[0],
(char *) "show servers");
Test->tprintf("Setup firewall back to allow mysql and wait\n");
Test->repl->unblock_node(0);
sleep(10);
Test->close_rwsplit();
Test->maxscales->close_rwsplit(0);
Test->check_maxscale_alive();
Test->check_maxscale_alive(0);
int rval = Test->global_result;
delete Test;