git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 09c2e7c)
Use usleep instead of select for timeouts in PostgresNode.pm
2017年7月17日 19:22:37 +0000 (15:22 -0400)
2017年7月17日 19:22:37 +0000 (15:22 -0400)
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


diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index bb2f39e508984fba32f082648a4db42ed39ce1d2..4f414c3c03f9845eaa2fbc230f850f72fbfb28cd 100644 (file)
--- 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++;
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /