Speed up testing

Removed unnecessary sleeps from tests that appear to serve no
purpose. Moveed the kerberos code from the general startup routines to the
kerberos test.
This commit is contained in:
Markus Mäkelä 2017-09-19 14:04:39 +03:00
parent 20bfe16d11
commit 773bae1615
5 changed files with 7 additions and 12 deletions

View File

@ -242,15 +242,9 @@ int main(int argc, char *argv[])
Test->tprintf("Restarting MaxScale\n");
Test->set_timeout(100);
Test->set_timeout(120);
Test->restart_maxscale();
Test->stop_maxscale();
Test->stop_timeout();
Test->tprintf("Waiting 20 seconds\n");
sleep(20);
Test->set_timeout(60);
Test->check_log_err((char *) "Loading database names", false);
Test->check_log_err((char *) "Unknown column", false);

View File

@ -138,6 +138,11 @@ int main(int argc, char *argv[])
"echo select User,Host from mysql.user | mysql -uusr1 -h maxscale.maxscale.test -P 4009", false),
"Error executing query against Read Connection Slave\n");
for (int i = 0; i < Test->repl->N; i++)
{
Test->repl->ssh_node(i, "sudo rm -f /etc/my.cnf.d/kerb.cnf", true);
}
int rval = Test->global_result;
delete Test;
return rval;

View File

@ -433,7 +433,6 @@ int Mariadb_nodes::start_replication()
"mysql -u root %s -e \"STOP SLAVE; RESET SLAVE; RESET SLAVE ALL; RESET MASTER; SET GLOBAL read_only=OFF;\"",
socket_cmd[i]);
ssh_node(i, str, true);
ssh_node(i, "sudo rm -f /etc/my.cnf.d/kerb.cnf", true);
}
sprintf(str, "%s/create_user.sh", test_dir);

View File

@ -66,7 +66,7 @@ int main(int argc, char *argv[])
test->tprintf("Restarting MaxScale");
test->restart_maxscale();
sleep(10);
sleep(2);
do_query(test, false);

View File

@ -46,10 +46,7 @@ int main(int argc, char *argv[])
Test->tprintf("Restart Maxscale");
Test->restart_maxscale();
sleep(10);
Test->check_maxscale_alive();
//Test->check_maxscale_processes(0);
Test->stop_timeout();
Test->tprintf("Restore backend configuration\n");