mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
This is another patch for test suite to make IM tests work smoothly.
The patch affects only test suite and has the following changes: 1. On starting Instance Manager -- added code for waiting for guarded mysqld instances to create PID files; 2. Polishing; 3. Move IM-related operations out of mtr_process.pl into new dedicated for IM file -- mtr_im.pl
This commit is contained in:
@ -88,6 +88,7 @@ use strict;
|
||||
#use diagnostics;
|
||||
|
||||
require "lib/mtr_cases.pl";
|
||||
require "lib/mtr_im.pl";
|
||||
require "lib/mtr_process.pl";
|
||||
require "lib/mtr_timer.pl";
|
||||
require "lib/mtr_io.pl";
|
||||
@ -964,6 +965,7 @@ sub command_line_setup () {
|
||||
path_datadir => "$opt_vardir/im_mysqld_1.data",
|
||||
path_sock => "$sockdir/mysqld_1.sock",
|
||||
path_pid => "$opt_vardir/run/mysqld_1.pid",
|
||||
start_timeout => 400, # enough time create innodb tables
|
||||
};
|
||||
|
||||
$instance_manager->{'instances'}->[1]=
|
||||
@ -974,6 +976,7 @@ sub command_line_setup () {
|
||||
path_sock => "$sockdir/mysqld_2.sock",
|
||||
path_pid => "$opt_vardir/run/mysqld_2.pid",
|
||||
nonguarded => 1,
|
||||
start_timeout => 400, # enough time create innodb tables
|
||||
};
|
||||
|
||||
if ( $opt_extern )
|
||||
@ -1316,9 +1319,6 @@ sub kill_running_server () {
|
||||
# started from ths run of the script, this is terminating
|
||||
# leftovers from previous runs.
|
||||
|
||||
mtr_report("Killing Possible Leftover Processes");
|
||||
mkpath("$opt_vardir/log"); # Needed for mysqladmin log
|
||||
|
||||
mtr_kill_leftovers();
|
||||
|
||||
$using_ndbcluster_master= $opt_with_ndbcluster;
|
||||
@ -2112,7 +2112,10 @@ sub run_testcase ($) {
|
||||
|
||||
im_create_defaults_file($instance_manager);
|
||||
|
||||
mtr_im_start($instance_manager, $tinfo->{im_opts});
|
||||
unless ( mtr_im_start($instance_manager, $tinfo->{im_opts}) )
|
||||
{
|
||||
mtr_error("Failed to start Instance Manager.")
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
@ -2209,7 +2212,10 @@ sub run_testcase ($) {
|
||||
|
||||
if ( ! $glob_use_running_server and $tinfo->{'component_id'} eq 'im' )
|
||||
{
|
||||
mtr_im_stop($instance_manager);
|
||||
unless ( mtr_im_stop($instance_manager) )
|
||||
{
|
||||
mtr_error("Failed to stop Instance Manager.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2738,7 +2744,10 @@ sub stop_masters_slaves () {
|
||||
print "Ending Tests\n";
|
||||
|
||||
print "Shutting-down Instance Manager\n";
|
||||
mtr_im_stop($instance_manager);
|
||||
unless ( mtr_im_stop($instance_manager) )
|
||||
{
|
||||
mtr_error("Failed to stop Instance Manager.")
|
||||
}
|
||||
|
||||
print "Shutting-down MySQL daemon\n\n";
|
||||
stop_masters();
|
||||
|
Reference in New Issue
Block a user