Commit 7f0b5b70 authored by Bjorn Munch's avatar Bjorn Munch

Bug #12590770 TEST SPECIFIC TIMEOUT SETTING DOES NOT APPLY TO "CHECK" OR "WARNINGS"

Replace global check_timeout with one that calls testcase_timeout for the test
parent 73d1992e
...@@ -263,7 +263,6 @@ my $opt_shutdown_timeout= $ENV{MTR_SHUTDOWN_TIMEOUT} || 10; # seconds ...@@ -263,7 +263,6 @@ my $opt_shutdown_timeout= $ENV{MTR_SHUTDOWN_TIMEOUT} || 10; # seconds
my $opt_start_timeout = $ENV{MTR_START_TIMEOUT} || 180; # seconds my $opt_start_timeout = $ENV{MTR_START_TIMEOUT} || 180; # seconds
sub suite_timeout { return $opt_suite_timeout * 60; }; sub suite_timeout { return $opt_suite_timeout * 60; };
sub check_timeout { return $opt_testcase_timeout * 6; };
my $opt_wait_all; my $opt_wait_all;
my $opt_user_args; my $opt_user_args;
...@@ -299,6 +298,8 @@ sub testcase_timeout ($) { ...@@ -299,6 +298,8 @@ sub testcase_timeout ($) {
return $opt_testcase_timeout * 60; return $opt_testcase_timeout * 60;
} }
sub check_timeout ($) { return testcase_timeout($_[0]) / 10; }
our $opt_warnings= 1; our $opt_warnings= 1;
our $opt_include_ndbcluster= 0; our $opt_include_ndbcluster= 0;
...@@ -3415,7 +3416,7 @@ sub check_testcase($$) ...@@ -3415,7 +3416,7 @@ sub check_testcase($$)
# Return immediately if no check proceess was started # Return immediately if no check proceess was started
return 0 unless ( keys %started ); return 0 unless ( keys %started );
my $timeout= start_timer(check_timeout()); my $timeout= start_timer(check_timeout($tinfo));
while (1){ while (1){
my $result; my $result;
...@@ -3487,7 +3488,7 @@ test case was executed:\n"; ...@@ -3487,7 +3488,7 @@ test case was executed:\n";
} }
elsif ( $proc->{timeout} ) { elsif ( $proc->{timeout} ) {
$tinfo->{comment}.= "Timeout for 'check-testcase' expired after " $tinfo->{comment}.= "Timeout for 'check-testcase' expired after "
.check_timeout()." seconds"; .check_timeout($tinfo)." seconds";
$result= 4; $result= 4;
} }
else { else {
...@@ -3577,7 +3578,7 @@ sub run_on_all($$) ...@@ -3577,7 +3578,7 @@ sub run_on_all($$)
# Return immediately if no check proceess was started # Return immediately if no check proceess was started
return 0 unless ( keys %started ); return 0 unless ( keys %started );
my $timeout= start_timer(check_timeout()); my $timeout= start_timer(check_timeout($tinfo));
while (1){ while (1){
my $result; my $result;
...@@ -3608,7 +3609,7 @@ sub run_on_all($$) ...@@ -3608,7 +3609,7 @@ sub run_on_all($$)
} }
elsif ($proc->{timeout}) { elsif ($proc->{timeout}) {
$tinfo->{comment}.= "Timeout for '$run' expired after " $tinfo->{comment}.= "Timeout for '$run' expired after "
.check_timeout()." seconds"; .check_timeout($tinfo)." seconds";
} }
else { else {
# Unknown process returned, most likley a crash, abort everything # Unknown process returned, most likley a crash, abort everything
...@@ -4333,7 +4334,7 @@ sub check_warnings ($) { ...@@ -4333,7 +4334,7 @@ sub check_warnings ($) {
# Return immediately if no check proceess was started # Return immediately if no check proceess was started
return 0 unless ( keys %started ); return 0 unless ( keys %started );
my $timeout= start_timer(check_timeout()); my $timeout= start_timer(check_timeout($tinfo));
while (1){ while (1){
my $result= 0; my $result= 0;
...@@ -4385,7 +4386,7 @@ sub check_warnings ($) { ...@@ -4385,7 +4386,7 @@ sub check_warnings ($) {
} }
elsif ( $proc->{timeout} ) { elsif ( $proc->{timeout} ) {
$tinfo->{comment}.= "Timeout for 'check warnings' expired after " $tinfo->{comment}.= "Timeout for 'check warnings' expired after "
.check_timeout()." seconds"; .check_timeout($tinfo)." seconds";
$result= 4; $result= 4;
} }
else { else {
......
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