Skip to content

Commit 231f487

Browse files
committed
Fix timeouts in PostgresNode::psql
Newer Perl or IPC::Run versions default to appending the filename to string exceptions, e.g. the exception psql timed out is thrown as psql timed out at /usr/share/perl5/vendor_perl/IPC/Run.pm line 2961. To handle this, match exceptions with !~ rather than ne. From: Craig Ringer <craig@2ndquadrant.com> Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
1 parent 8f7277d commit 231f487

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/perl/PostgresNode.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ sub psql
11391139
# IPC::Run::run threw an exception. re-throw unless it's a
11401140
# timeout, which we'll handle by testing is_expired
11411141
die $exc_save
1142-
if (blessed($exc_save) || $exc_save ne $timeout_exception);
1142+
if (blessed($exc_save) || $exc_save !~ /^\Q$timeout_exception\E/);
11431143

11441144
$ret = undef;
11451145

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