aboutsummaryrefslogtreecommitdiff
path: root/src/test/perl/PostgresNode.pm
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2017-07-17 15:22:37 -0400
committerAndrew Dunstan <andrew@dunslane.net>2017-07-17 15:22:37 -0400
commit6c6970a280a50434c28ccd461ba864798f5d2a04 (patch)
tree92c3dbc514c1972f0000a6fac198fc862d760305 /src/test/perl/PostgresNode.pm
parent09c2e7cd2ff0b884625c37ce8249832820c58710 (diff)
downloadpostgresql-6c6970a280a50434c28ccd461ba864798f5d2a04.tar.gz
postgresql-6c6970a280a50434c28ccd461ba864798f5d2a04.zip
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
Diffstat (limited to 'src/test/perl/PostgresNode.pm')
-rw-r--r--src/test/perl/PostgresNode.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index bb2f39e5089..4f414c3c03f 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -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++;
}