Skip to content

Commit 6c6970a

Browse files
committed
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
1 parent 09c2e7c commit 6c6970a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/perl/PostgresNode.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ use RecursiveCopy;
9393
use Socket;
9494
use Test::More;
9595
use TestLib ();
96+
use Time::HiRes qw(usleep);
9697
use Scalar::Util qw(blessed);
9798

9899
our @EXPORT = qw(
@@ -1248,7 +1249,7 @@ sub poll_query_until
12481249
}
12491250

12501251
# Wait 0.1 second before retrying.
1251-
select undef, undef, undef, 0.1;
1252+
usleep(100000);
12521253

12531254
$attempts++;
12541255
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy