Remove unnecessary SSHing to MaxScale at test startup
There were a total of five SSH connections opened at the start of each test. Only two of these are currently required: the SSL certificate directory check and the actual command that restarts MaxScale. Two of the three remaining commands, stopping of MaxScale and copying of the configuration, can be made conditional or combined into other commands. The stopping of MaxScale is done to prevent it from interfering with the cluster setup process. As MaxScale does nothing if nothing is wrong, it is safe to make the restart conditional so that it is done only when a problem in the cluster setup is detected. The final SSH command, the MaxScale health check via maxadmin, can be removed as it is redundant: the daemonization already covers this by exiting only after MaxScale is ready.
This commit is contained in:
@ -267,6 +267,15 @@ public:
|
||||
return stop_maxscale(m);
|
||||
}
|
||||
|
||||
// Helper for stopping all maxscales
|
||||
void stop_all()
|
||||
{
|
||||
for (int i = 0; i < N; i++)
|
||||
{
|
||||
stop(i);
|
||||
}
|
||||
}
|
||||
|
||||
int execute_maxadmin_command(int m, const char* cmd);
|
||||
int execute_maxadmin_command_print(int m, const char* cmd);
|
||||
int check_maxadmin_param(int m, const char* command, const char* param, const char* value);
|
||||
|
Reference in New Issue
Block a user