Commit f564e7f8 authored by anozdrin/alik@alik's avatar anozdrin/alik@alik

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
parent 0f057bfc
...@@ -2,3 +2,5 @@ ...@@ -2,3 +2,5 @@
44ec850ac2k4y2Omgr92GiWPBAVKGQ 44ec850ac2k4y2Omgr92GiWPBAVKGQ
44edb86b1iE5knJ97MbliK_3lCiAXA 44edb86b1iE5knJ97MbliK_3lCiAXA
44f33f3aj5KW5qweQeekY1LU0E9ZCg 44f33f3aj5KW5qweQeekY1LU0E9ZCg
45001f7c3b2hhCXDKfUvzkX9TNe6VA
45002051rHJfMEXAIMiAZV0clxvKSA
This diff is collapsed.
This diff is collapsed.
...@@ -88,6 +88,7 @@ use strict; ...@@ -88,6 +88,7 @@ use strict;
#use diagnostics; #use diagnostics;
require "lib/mtr_cases.pl"; require "lib/mtr_cases.pl";
require "lib/mtr_im.pl";
require "lib/mtr_process.pl"; require "lib/mtr_process.pl";
require "lib/mtr_timer.pl"; require "lib/mtr_timer.pl";
require "lib/mtr_io.pl"; require "lib/mtr_io.pl";
...@@ -964,6 +965,7 @@ sub command_line_setup () { ...@@ -964,6 +965,7 @@ sub command_line_setup () {
path_datadir => "$opt_vardir/im_mysqld_1.data", path_datadir => "$opt_vardir/im_mysqld_1.data",
path_sock => "$sockdir/mysqld_1.sock", path_sock => "$sockdir/mysqld_1.sock",
path_pid => "$opt_vardir/run/mysqld_1.pid", path_pid => "$opt_vardir/run/mysqld_1.pid",
start_timeout => 400, # enough time create innodb tables
}; };
$instance_manager->{'instances'}->[1]= $instance_manager->{'instances'}->[1]=
...@@ -974,6 +976,7 @@ sub command_line_setup () { ...@@ -974,6 +976,7 @@ sub command_line_setup () {
path_sock => "$sockdir/mysqld_2.sock", path_sock => "$sockdir/mysqld_2.sock",
path_pid => "$opt_vardir/run/mysqld_2.pid", path_pid => "$opt_vardir/run/mysqld_2.pid",
nonguarded => 1, nonguarded => 1,
start_timeout => 400, # enough time create innodb tables
}; };
if ( $opt_extern ) if ( $opt_extern )
...@@ -1316,9 +1319,6 @@ sub kill_running_server () { ...@@ -1316,9 +1319,6 @@ sub kill_running_server () {
# started from ths run of the script, this is terminating # started from ths run of the script, this is terminating
# leftovers from previous runs. # leftovers from previous runs.
mtr_report("Killing Possible Leftover Processes");
mkpath("$opt_vardir/log"); # Needed for mysqladmin log
mtr_kill_leftovers(); mtr_kill_leftovers();
$using_ndbcluster_master= $opt_with_ndbcluster; $using_ndbcluster_master= $opt_with_ndbcluster;
...@@ -2112,7 +2112,10 @@ sub run_testcase ($) { ...@@ -2112,7 +2112,10 @@ sub run_testcase ($) {
im_create_defaults_file($instance_manager); 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 ($) { ...@@ -2209,7 +2212,10 @@ sub run_testcase ($) {
if ( ! $glob_use_running_server and $tinfo->{'component_id'} eq 'im' ) 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 () { ...@@ -2738,7 +2744,10 @@ sub stop_masters_slaves () {
print "Ending Tests\n"; print "Ending Tests\n";
print "Shutting-down Instance Manager\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"; print "Shutting-down MySQL daemon\n\n";
stop_masters(); stop_masters();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment