refactored tests (#147)
This commit is contained in:
@ -30,21 +30,21 @@ int main(int argc, char *argv[])
|
||||
TestConnections * Test = new TestConnections(argc, argv);
|
||||
Test->set_timeout(20);
|
||||
|
||||
Test->connect_maxscale();
|
||||
Test->maxscales->connect_maxscale(0);
|
||||
|
||||
if (mysql_errno(Test->conn_rwsplit) == 0)
|
||||
if (mysql_errno(Test->maxscales->conn_rwsplit[0]) == 0)
|
||||
{
|
||||
Test->add_result(1, "RWSplit services should fail, but it is started\n");
|
||||
}
|
||||
|
||||
Test->tprintf("Trying query to ReadConn master\n");
|
||||
Test->try_query(Test->conn_master, "show processlist;");
|
||||
Test->try_query(Test->maxscales->conn_master[0], "show processlist;");
|
||||
Test->tprintf("Trying query to ReadConn slave\n");
|
||||
Test->try_query(Test->conn_slave, "show processlist;");
|
||||
Test->try_query(Test->maxscales->conn_slave[0], "show processlist;");
|
||||
|
||||
Test->close_maxscale_connections();
|
||||
Test->maxscales->close_maxscale_connections(0);
|
||||
|
||||
Test->check_log_err("There are too few backend servers configured in", true);
|
||||
Test->check_log_err(0, "There are too few backend servers configured in", true);
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
Reference in New Issue
Block a user