File tree 1 file changed +11
-7
lines changed
src/test/modules/test_misc/t
1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 3
3
4
4
use strict;
5
5
use warnings;
6
+ use locale;
7
+
6
8
use PostgreSQL::Test::Cluster;
7
9
use PostgreSQL::Test::Utils;
8
10
use Time::HiRes qw( usleep) ;
35
37
36
38
# The following query will generate a stream of SELECT 1 queries. This is done
37
39
# so to exercise transaction timeout in the presence of short queries.
40
+ # Note: the interval value is parsed with locale-aware strtod()
38
41
$psql_session -> query_until(
39
- qr / starting_bg_psql/ , q(
40
- \echo starting_bg_psql
41
- SET transaction_timeout to '10ms';
42
- BEGIN;
43
- SELECT 1 \watch 0.001
44
- \q
45
- ) );
42
+ qr / starting_bg_psql/ ,
43
+ sprintf (
44
+ q( \echo starting_bg_psql
45
+ SET transaction_timeout to '10ms';
46
+ BEGIN;
47
+ SELECT 1 \watch %g
48
+ \q
49
+ ) , 0.001));
46
50
47
51
# Wait until the backend enters the timeout injection point. Will get an error
48
52
# here if anything goes wrong.
You can’t perform that action at this time.
0 commit comments