mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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()).
This commit is contained in:
@@ -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...");
|
||||
}
|
||||
|
Reference in New Issue
Block a user