Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f5293fb

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 719304a commit f5293fb

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)