refactored tests (#147)
This commit is contained in:
@ -153,7 +153,7 @@ int main(int argc, char *argv[])
|
||||
Test->set_timeout(10);
|
||||
|
||||
Test->repl->connect();
|
||||
Test->add_result(Test->connect_maxscale(), "Failed to connect to MaxScale\n");
|
||||
Test->add_result(Test->maxscales->connect_maxscale(0), "Failed to connect to MaxScale\n");
|
||||
|
||||
char server_id[256];
|
||||
char server_id_d[256];
|
||||
@ -169,7 +169,7 @@ int main(int argc, char *argv[])
|
||||
Test->set_timeout(5);
|
||||
sprintf(hint_sql, "select @@server_id; -- maxscale route to server server%d", j + 1);
|
||||
|
||||
find_field(Test->conn_rwsplit, hint_sql, (char *) "@@server_id", &server_id[0]);
|
||||
find_field(Test->maxscales->conn_rwsplit[0], hint_sql, (char *) "@@server_id", &server_id[0]);
|
||||
find_field(Test->repl->nodes[j], (char *) "select @@server_id;", (char *) "@@server_id", &server_id_d[0]);
|
||||
|
||||
Test->tprintf("server%d ID from Maxscale: \t%s\n", j + 1, server_id);
|
||||
@ -182,10 +182,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
Test->set_timeout(10);
|
||||
|
||||
Test->close_maxscale_connections();
|
||||
Test->maxscales->close_maxscale_connections(0);
|
||||
Test->repl->close_connections();
|
||||
|
||||
Test->check_maxscale_alive();
|
||||
Test->check_maxscale_alive(0);
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
Reference in New Issue
Block a user