diff options
author | Monty <monty@mariadb.org> | 2021-06-11 14:26:50 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2021-06-14 17:03:19 +0300 |
commit | 15d2a6cfa31f3451abc78edba9df656df1456355 (patch) | |
tree | fcb871d9bfdb2c065ccbf4c0b0e400306b3368a1 /mysql-test/lib/mtr_process.pl | |
parent | 6f15a8e4f701e28a6e1f57dd535f70c6ea55d731 (diff) | |
download | mariadb-git-15d2a6cfa31f3451abc78edba9df656df1456355.tar.gz |
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()).
Diffstat (limited to 'mysql-test/lib/mtr_process.pl')
-rw-r--r-- | mysql-test/lib/mtr_process.pl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 7cadc5488a0..4c64a546f65 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -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..."); } |