Commit 15d2a6cf authored by Monty's avatar Monty

Fixed mysql-test-run "Waiting ... seconds for pidfile" output

Now the output is only written every 60 second (as it used to be before my
latest change to sleep_until_file_created()).
parent 6f15a8e4
......@@ -109,6 +109,7 @@ sub sleep_until_file_created ($$$$) {
my $warn_seconds = shift;
my $sleeptime= 10; # Milliseconds
my $loops= ($timeout * 10000) / $sleeptime;
my $message_time= 60;
for ( my $loop= 0; $loop <= $loops; $loop++ )
{
......@@ -130,9 +131,10 @@ sub sleep_until_file_created ($$$$) {
mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile");
# Print extra message every $warn_seconds seconds
if ( $seconds > 1 && ($seconds*10) % ($warn_seconds*10) == 0 && $seconds < $timeout )
if ( $seconds >= $message_time)
{
my $left= $timeout - $seconds;
$message_time= $message_time+60;
my $left= $timeout - int($seconds);
mtr_warning("Waited $seconds seconds for $pidfile to be created, " .
"still waiting for $left seconds...");
}
......
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