diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-03-01 13:52:38 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-03-01 14:18:51 -0500 |
commit | 231f48796bcf2976f19122b8c6e12f50b463f94e (patch) | |
tree | 7056f7405545c2a2f58de4a1fa0a1665fb510eeb /src/test/perl/PostgresNode.pm | |
parent | 8f7277dfb5e703a034dbce7b155d998e577a6bc3 (diff) | |
download | postgresql-231f48796bcf2976f19122b8c6e12f50b463f94e.tar.gz postgresql-231f48796bcf2976f19122b8c6e12f50b463f94e.zip |
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>
Diffstat (limited to 'src/test/perl/PostgresNode.pm')
-rw-r--r-- | src/test/perl/PostgresNode.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index 4018f0af1fc..e5cb348f4c8 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -1139,7 +1139,7 @@ sub psql # IPC::Run::run threw an exception. re-throw unless it's a # timeout, which we'll handle by testing is_expired die $exc_save - if (blessed($exc_save) || $exc_save ne $timeout_exception); + if (blessed($exc_save) || $exc_save !~ /^\Q$timeout_exception\E/); $ret = undef; |