File: fc7df276fce43678df291eef2dd79520f0bb2df9

package info (click to toggle)
check-postgres 2.25.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,016 kB
  • sloc: perl: 12,307; sh: 18; makefile: 13
file content (24 lines) | stat: -rw-r--r-- 971 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
commit fc7df276fce43678df291eef2dd79520f0bb2df9
Author: Christoph Berg <myon@debian.org>
Date:   Mon Dec 6 14:45:23 2021 +0100

    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.

diff --git a/t/02_connection.t b/t/02_connection.t
index 958a4f5..5beb74e 100644
--- a/t/02_connection.t
+++ b/t/02_connection.t
@@ -56,7 +56,7 @@ like ($cp->run(), qr{^$label UNKNOWN:.*Invalid query}, $t);
 
 $cp->fake_version_timeout();
 $t=qq{$S fails on timeout};
-like ($cp->run('--timeout 1'), qr{^$label CRITICAL:.*Timed out}, $t);
+like ($cp->run('--timeout 1'), qr{^$label CRITICAL:.*(Timed out|statement timeout)}, $t);
 $cp->reset_path();
 
 $t=qq{$S fails on nonexisting socket};