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:02:06 -0500 |
commit | 3a1a422fa57a193f5dda93ea1b7941fdac42ac96 (patch) | |
tree | 96bec4e177e3288bd3146523cb395b07c8447478 | |
parent | 965956a03305fb8517c584ffffd37515344f4101 (diff) | |
download | postgresql-3a1a422fa57a193f5dda93ea1b7941fdac42ac96.tar.gz postgresql-3a1a422fa57a193f5dda93ea1b7941fdac42ac96.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>
-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 9b712ebf306..bd627b29dee 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -1116,7 +1116,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; |