Skip to content

Commit 76b2b3e

Browse files
committed
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
1 parent 16c9779 commit 76b2b3e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/ldap/t/001_auth.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ sub test_access
165165
my ($node, $role, $expected_res, $test_name) = @_;
166166

167167
my $res =
168-
$node->psql('postgres', 'SELECT 1', extra_params => [ '-U', $role ]);
168+
$node->psql('postgres', undef,
169+
extra_params => [ '-U', $role, '-c', 'SELECT 1' ]);
169170
is($res, $expected_res, $test_name);
170171
return;
171172
}

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