diff options
author | unknown <anozdrin@mysql.com> | 2005-10-01 01:12:14 +0400 |
---|---|---|
committer | unknown <anozdrin@mysql.com> | 2005-10-01 01:12:14 +0400 |
commit | 46d8163b1b53a61e75ff43cb140e6055dc7cad05 (patch) | |
tree | 6ced88c7edc8cadde7a6e8ab267f9acebe9a59a0 /mysql-test/lib | |
parent | eeae3fc30abe7ba01c48269bf7bbad323e2f9aa0 (diff) | |
download | mariadb-git-46d8163b1b53a61e75ff43cb140e6055dc7cad05.tar.gz |
WL#2789 "Instance Manager: test using mysql-test-run testing framework"
1) Add support to testing Instance Manager in daemon mode;
2) Don't run Instance Manager tests when running with --ps-protocol option;
mysql-test/lib/mtr_cases.pl:
WL#2789 "Instance Manager: test using mysql-test-run testing framework"
Skip/disable Instance Manager tests in the following cases:
- we are testing embedded server;
- we are running with --ps-protocol;
- Instance Manager executable does not exist;
Report about the reason in the standard way.
mysql-test/lib/mtr_process.pl:
WL#2789 "Instance Manager: test using mysql-test-run testing framework"
Make several attempts (i.e. send several signals to process) while trying to kill it.
mysql-test/mysql-test-run.pl:
WL#2789 "Instance Manager: test using mysql-test-run testing framework"
Add support for testing Instance Manager in daemon mode.
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/mtr_cases.pl | 46 | ||||
-rw-r--r-- | mysql-test/lib/mtr_process.pl | 14 |
2 files changed, 37 insertions, 23 deletions
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 250c3562227..ca984d37ecf 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -61,22 +61,6 @@ sub collect_test_cases ($) { $elem= $tname; $tname =~ s/\.imtest$//; $component_id= 'im'; - - if ( $::glob_use_embedded_server ) - { - mtr_report( - "Instance Manager's tests are not available in embedded mode." . - "Test case '$tname' is skipped."); - next; - } - - unless ( $::exe_im ) - { - mtr_report( - "Instance Manager executable is unavailable. " . - "Test case '$tname' is skipped."); - next; - } } # If target component is known, check that the specified test case @@ -115,7 +99,7 @@ sub collect_test_cases ($) { $component_id= 'im'; } } - + collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,{}, $component_id); } @@ -403,6 +387,34 @@ sub collect_one_test_case($$$$$$$) { $tinfo->{'comment'}= mtr_fromfile($disabled_file); } + if ( $component_id eq 'im' ) + { + if ( $::glob_use_embedded_server ) + { + $tinfo->{'skip'}= 1; + + mtr_report( + "Instance Manager tests are not available in embedded mode. " . + "Test case '$tname' is skipped."); + } + elsif ( $::opt_ps_protocol ) + { + $tinfo->{'skip'}= 1; + + mtr_report( + "Instance Manager tests are not run with --ps-protocol. " . + "Test case '$tname' is skipped."); + } + elsif ( !$::exe_im ) + { + $tinfo->{'skip'}= 1; + + mtr_report( + "Instance Manager executable is unavailable." . + "Test case '$tname' is skipped."); + } + } + # We can't restart a running server that may be in use if ( $::glob_use_running_server and diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 0fb4282ce7f..eb60df4a5cb 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -848,14 +848,16 @@ sub sleep_until_file_created ($$$) { sub mtr_kill_processes ($) { my $pids = shift; - foreach my $sig (15,9) + foreach my $sig (15, 9) { - my $retries= 20; # FIXME 20 seconds, this is silly! - kill($sig, @{$pids}); - while ( $retries-- and kill(0, @{$pids}) ) + my $retries= 10; + while (1) { - mtr_debug("Sleep 1 second waiting for processes to die"); - sleep(1) # Wait one second + kill($sig, @{$pids}); + last unless kill (0, @{$pids}) and $retries--; + + mtr_debug("Sleep 2 second waiting for processes to die"); + sleep(2); } } } |