diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2020-03-04 11:44:49 +0100 |
---|---|---|
committer | Marc Hoersken <info@marc-hoersken.de> | 2020-03-04 15:31:42 +0100 |
commit | 9aaca09044de4d4116822f25d2cf9c780d7465ce (patch) | |
tree | 143fcfc746a42c8b045f14f61ffc73a676e143fc /tests/runtests.pl | |
parent | 1eecb0e022423b92c79e8d946c78dcfc20ab56af (diff) |
tests: try to make sleeping portable by avoiding select
select does not support just waiting on Windows:
https://perldoc.perl.org/perlport.html#select
Reviewed-By: Daniel Stenberg
Closes #5035
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-x | tests/runtests.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index 3306de397..7a5f8a504 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -482,7 +482,7 @@ sub startnew { logmsg "startnew: failed to write fake $pidfile with pid=$child\n"; } # could/should do a while connect fails sleep a bit and loop - sleep $timeout; + portable_sleep($timeout); if (checkdied($child)) { logmsg "startnew: child process has failed to start\n" if($verbose); return (-1,-1); @@ -3823,7 +3823,7 @@ sub singletest { if($serverlogslocktimeout) { my $lockretry = $serverlogslocktimeout * 20; while((-f $SERVERLOGS_LOCK) && $lockretry--) { - select(undef, undef, undef, 0.05); + portable_sleep(0.05); } if(($lockretry < 0) && ($serverlogslocktimeout >= $defserverlogslocktimeout)) { @@ -3840,7 +3840,7 @@ sub singletest { # based tests might need a small delay once that the client command has # run to avoid false test failures. - sleep($postcommanddelay) if($postcommanddelay); + portable_sleep($postcommanddelay) if($postcommanddelay); # timestamp removal of server logs advisor read lock $timesrvrlog{$testnum} = Time::HiRes::time(); |