Skip to content

Commit 15d2a6c

Browse files
committed
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()).
1 parent 6f15a8e commit 15d2a6c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mysql-test/lib/mtr_process.pl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ ($$$$)
109109
my $warn_seconds = shift;
110110
my $sleeptime= 10; # Milliseconds
111111
my $loops= ($timeout * 10000) / $sleeptime;
112+
my $message_time= 60;
112113

113114
for ( my $loop= 0; $loop <= $loops; $loop++ )
114115
{
@@ -130,9 +131,10 @@ ($$$$)
130131
mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile");
131132

132133
# Print extra message every $warn_seconds seconds
133-
if ( $seconds > 1 && ($seconds*10) % ($warn_seconds*10) == 0 && $seconds < $timeout )
134+
if ( $seconds >= $message_time)
134135
{
135-
my $left= $timeout - $seconds;
136+
$message_time= $message_time+60;
137+
my $left= $timeout - int($seconds);
136138
mtr_warning("Waited $seconds seconds for $pidfile to be created, " .
137139
"still waiting for $left seconds...");
138140
}

0 commit comments

Comments
 (0)