refactored tests (#147)
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user