Skip to content

Commit fc7df27

Browse files
committed
t/02_connection.t: Accept "statement timeout" in test
The --timeout argument is racy, it sets an alarm() timer in check_postgres, but also statement_timeout on the PG server side. Usually the alarm() will hit first, but sometimes the statement_timeout hits as well. Seen on the slowish ppc64el buildd for apt.postgresql.org.
1 parent 81e53fc commit fc7df27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/02_connection.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ like ($cp->run(), qr{^$label UNKNOWN:.*Invalid query}, $t);
5656

5757
$cp->fake_version_timeout();
5858
$t=qq{$S fails on timeout};
59-
like ($cp->run('--timeout 1'), qr{^$label CRITICAL:.*Timed out}, $t);
59+
like ($cp->run('--timeout 1'), qr{^$label CRITICAL:.*(Timed out|statement timeout)}, $t);
6060
$cp->reset_path();
6161

6262
$t=qq{$S fails on nonexisting socket};

0 commit comments

Comments
 (0)