diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/authentication/t/007_pre_auth.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/test/authentication/t/007_pre_auth.pl b/src/test/authentication/t/007_pre_auth.pl index a638226dbaf..12e40dc722c 100644 --- a/src/test/authentication/t/007_pre_auth.pl +++ b/src/test/authentication/t/007_pre_auth.pl @@ -43,12 +43,16 @@ $psql->query_safe("SELECT injection_points_attach('init-pre-auth', 'wait')"); # authentication. Use the $psql connection handle for server interaction. my $conn = $node->background_psql('postgres', wait => 0); -# Wait for the connection to show up. +# Wait for the connection to show up in pg_stat_activity, with the wait_event +# of the injection point. my $pid; while (1) { $pid = $psql->query( - "SELECT pid FROM pg_stat_activity WHERE state = 'starting';"); + qq{SELECT pid FROM pg_stat_activity + WHERE backend_type = 'client backend' + AND state = 'starting' + AND wait_event = 'init-pre-auth';}); last if $pid ne ""; usleep(100_000); |