Commit f44b9b62 authored by Thomas Munro's avatar Thomas Munro

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: default avatarNoah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/CA%2BhUKGLFmW%2BHQYPeKiwSp5sdFFHtFViCpw4Mh6yAgEx74r5-Cw%40mail.gmail.com
parent 63e9aa68
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment