use-timer-not-timeout-in-BackgroundPsql.patch
text/x-diff
Filename: use-timer-not-timeout-in-BackgroundPsql.patch
Type: text/x-diff
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| src/test/perl/PostgreSQL/Test/BackgroundPsql.pm | 1 | 1 |
| src/test/perl/PostgreSQL/Test/Utils.pm | 1 | 0 |
diff --git a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
index 4091c311b8..72bb21e160 100644
--- a/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
+++ b/src/test/perl/PostgreSQL/Test/BackgroundPsql.pm
@@ -96,7 +96,7 @@ sub new
"Forbidden caller of constructor: package: $package, file: $file:$line"
unless $package->isa('PostgreSQL::Test::Cluster');
- $psql->{timeout} = IPC::Run::timeout(
+ $psql->{timeout} = IPC::Run::timer(
defined($timeout)
? $timeout
: $PostgreSQL::Test::Utils::timeout_default);
diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm
index 42d5a50dc8..8fd0426d30 100644
--- a/src/test/perl/PostgreSQL/Test/Utils.pm
+++ b/src/test/perl/PostgreSQL/Test/Utils.pm
@@ -429,6 +429,7 @@ Pump until string is matched on the specified stream, or timeout occurs.
sub pump_until
{
my ($proc, $timeout, $stream, $until) = @_;
+ die "timeout should be a timer" if defined($timeout->exception);
$proc->pump_nb();
while (1)
{