Clean up mxs548_short_session_change_user

The test unnecessarily did an unconditional drop of the user resulting in
errors. Also prevented stopping of MaxScale if it wasn't started in the
first place.
This commit is contained in:
Markus Mäkelä 2018-06-17 22:07:43 +03:00
parent 2ad8b77f11
commit 24bb8b0b2c
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 5 additions and 2 deletions

View File

@ -86,7 +86,7 @@ int main(int argc, char *argv[])
Test->repl->sync_slaves();
Test->tprintf("Creating user 'user' \n");
execute_query(Test->maxscales->conn_rwsplit[0], (char *) "DROP USER user@'%%'");
execute_query(Test->maxscales->conn_rwsplit[0], (char *) "DROP USER IF EXISTS user@'%%'");
execute_query(Test->maxscales->conn_rwsplit[0], (char *) "CREATE USER user@'%%' IDENTIFIED BY 'pass2'");
execute_query(Test->maxscales->conn_rwsplit[0], (char *) "GRANT SELECT ON test.* TO user@'%%'");
execute_query(Test->maxscales->conn_rwsplit[0], (char *) "DROP TABLE IF EXISTS test.t1");

View File

@ -641,7 +641,10 @@ void TestConnections::init_maxscale(int m)
{
const char * template_name = get_template_name(test_name);
stop_maxscale(m);
if (maxscale::start)
{
stop_maxscale(m);
}
process_template(m, template_name, maxscales->access_homedir[m]);
maxscales->ssh_node_f(m, true,