Commit 6c6970a2 authored by Andrew Dunstan's avatar Andrew Dunstan

Use usleep instead of select for timeouts in PostgresNode.pm

select() for pure timeouts is not portable, and in particular doesn't
work on Windows.

Discussion: https://postgr.es/m/186943e0-3405-978d-b19d-9d3335427c86@2ndQuadrant.com
parent 09c2e7cd
......@@ -93,6 +93,7 @@ use RecursiveCopy;
use Socket;
use Test::More;
use TestLib ();
use Time::HiRes qw(usleep);
use Scalar::Util qw(blessed);
our @EXPORT = qw(
......@@ -1248,7 +1249,7 @@ sub poll_query_until
}
# Wait 0.1 second before retrying.
select undef, undef, undef, 0.1;
usleep(100000);
$attempts++;
}
......
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