aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2020-08-03 12:39:15 +1200
committerThomas Munro <tmunro@postgresql.org>2020-08-03 12:44:27 +1200
commit76b2b3e72438dda2ec0566ee85feadde3224ff2f (patch)
treeb0b007fe2819f31a81eed13e88e7f092ac71a2a4 /src
parent16c977906e92673b22a05bc80e9a53d023cdd79b (diff)
downloadpostgresql-76b2b3e72438dda2ec0566ee85feadde3224ff2f.tar.gz
postgresql-76b2b3e72438dda2ec0566ee85feadde3224ff2f.zip
Fix rare failure in LDAP tests.
Instead of writing a query to psql's stdin, use -c. This avoids a failure where psql exits before we write, seen a few times on the build farm. Thanks to Tom Lane for the suggestion. Back-patch to 11, where the LDAP tests arrived. Reviewed-by: Noah Misch <noah@leadboat.com> Discussion: https://postgr.es/m/CA%2BhUKGLFmW%2BHQYPeKiwSp5sdFFHtFViCpw4Mh6yAgEx74r5-Cw%40mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/test/ldap/t/001_auth.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl
index f8941144f5e..3bc7672451e 100644
--- a/src/test/ldap/t/001_auth.pl
+++ b/src/test/ldap/t/001_auth.pl
@@ -165,7 +165,8 @@ sub test_access
my ($node, $role, $expected_res, $test_name) = @_;
my $res =
- $node->psql('postgres', 'SELECT 1', extra_params => [ '-U', $role ]);
+ $node->psql('postgres', undef,
+ extra_params => [ '-U', $role, '-c', 'SELECT 1' ]);
is($res, $expected_res, $test_name);
return;
}