diff options
Diffstat (limited to 'mysql-test/lib')
-rw-r--r-- | mysql-test/lib/mtr_process.pl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 88e714f6f8d..cebb895da6e 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -40,7 +40,7 @@ BEGIN eval 'sub USE_NETPING { $use_netping }'; } -sub sleep_until_file_created ($$$); +sub sleep_until_file_created ($$$$); sub mtr_ping_port ($); sub mtr_ping_port ($) { @@ -102,10 +102,11 @@ sub mtr_ping_port ($) { # FIXME check that the pidfile contains the expected pid! -sub sleep_until_file_created ($$$) { +sub sleep_until_file_created ($$$$) { my $pidfile= shift; my $timeout= shift; my $proc= shift; + my $warn_seconds = shift; my $sleeptime= 100; # Milliseconds my $loops= ($timeout * 1000) / $sleeptime; @@ -128,8 +129,8 @@ sub sleep_until_file_created ($$$) { mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile"); - # Print extra message every 60 seconds - if ( $seconds > 1 && int($seconds * 10) % 600 == 0 && $seconds < $timeout ) + # Print extra message every $warn_seconds seconds + if ( $seconds > 1 && $seconds % $warn_seconds == 0 && $seconds < $timeout ) { my $left= $timeout - $seconds; mtr_warning("Waited $seconds seconds for $pidfile to be created, " . |