Commit e701346d authored by unknown's avatar unknown

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


mysql-test/mysql-test-run.pl:
  1. Require new file with IM-related operations;
  2. Added timeout to wait for PID files of guarded instances;
  3. Polishing.
mysql-test/lib/mtr_process.pl:
  Move IM-related operations to new file.
mysql-test/lib/mtr_im.pl:
  File for IM-related operations.
parent 7c99f644
......@@ -2,3 +2,5 @@
44ec850ac2k4y2Omgr92GiWPBAVKGQ
44edb86b1iE5knJ97MbliK_3lCiAXA
44f33f3aj5KW5qweQeekY1LU0E9ZCg
45001f7c3b2hhCXDKfUvzkX9TNe6VA
45002051rHJfMEXAIMiAZV0clxvKSA
This diff is collapsed.
This diff is collapsed.
......@@ -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();
......
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