Skip to content

Commit a661bf7

Browse files
committed
Remove flaky isolation tests for timeouts
51efe38 introduced bunch of tests for idle_in_transaction_session_timeout, transaction_timeout and statement_timeout. These tests were too flaky on some slow buildfarm machines, so we plan to replace them with TAP tests using injection points. This commit removes flaky tests. Discussion: https://postgr.es/m/CAAhFRxiQsRs2Eq5kCo9nXE3HTugsAAJdSQSmxncivebAxdmBjQ%40mail.gmail.com Author: Andrey Borodin
1 parent 874d817 commit a661bf7

File tree

2 files changed

+2
-117
lines changed

2 files changed

+2
-117
lines changed
Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Parsed test spec with 7 sessions
1+
Parsed test spec with 2 sessions
22

33
starting permutation: rdtbl sto locktbl
44
step rdtbl: SELECT * FROM accounts;
@@ -79,80 +79,3 @@ step slto: SET lock_timeout = '10s'; SET statement_timeout = '10ms';
7979
step update: DELETE FROM accounts WHERE accountid = 'checking'; <waiting ...>
8080
step update: <... completed>
8181
ERROR: canceling statement due to statement timeout
82-
83-
starting permutation: stto s3_begin s3_sleep s3_check s3_abort
84-
step stto: SET statement_timeout = '10ms'; SET transaction_timeout = '1s';
85-
step s3_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
86-
step s3_sleep: SELECT pg_sleep(0.1);
87-
ERROR: canceling statement due to statement timeout
88-
step s3_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s3';
89-
count
90-
-----
91-
1
92-
(1 row)
93-
94-
step s3_abort: ABORT;
95-
96-
starting permutation: tsto s3_begin checker_sleep s3_check
97-
step tsto: SET statement_timeout = '1s'; SET transaction_timeout = '10ms';
98-
step s3_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
99-
step checker_sleep: SELECT pg_sleep(0.1);
100-
pg_sleep
101-
--------
102-
103-
(1 row)
104-
105-
step s3_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s3';
106-
count
107-
-----
108-
0
109-
(1 row)
110-
111-
112-
starting permutation: itto s4_begin checker_sleep s4_check
113-
step itto: SET idle_in_transaction_session_timeout = '10ms'; SET transaction_timeout = '1s';
114-
step s4_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
115-
step checker_sleep: SELECT pg_sleep(0.1);
116-
pg_sleep
117-
--------
118-
119-
(1 row)
120-
121-
step s4_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s4';
122-
count
123-
-----
124-
0
125-
(1 row)
126-
127-
128-
starting permutation: tito s5_begin checker_sleep s5_check
129-
step tito: SET idle_in_transaction_session_timeout = '1s'; SET transaction_timeout = '10ms';
130-
step s5_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
131-
step checker_sleep: SELECT pg_sleep(0.1);
132-
pg_sleep
133-
--------
134-
135-
(1 row)
136-
137-
step s5_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s5';
138-
count
139-
-----
140-
0
141-
(1 row)
142-
143-
144-
starting permutation: s6_begin s6_tt checker_sleep s6_check
145-
step s6_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
146-
step s6_tt: SET statement_timeout = '1s'; SET transaction_timeout = '10ms';
147-
step checker_sleep: SELECT pg_sleep(0.1);
148-
pg_sleep
149-
--------
150-
151-
(1 row)
152-
153-
step s6_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s6';
154-
count
155-
-----
156-
0
157-
(1 row)
158-
Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Simple tests for statement_timeout, lock_timeout and transaction_timeout features
1+
# Simple tests for statement_timeout and lock_timeout features
22

33
setup
44
{
@@ -27,33 +27,6 @@ step locktbl { LOCK TABLE accounts; }
2727
step update { DELETE FROM accounts WHERE accountid = 'checking'; }
2828
teardown { ABORT; }
2929

30-
session s3
31-
step s3_begin { BEGIN ISOLATION LEVEL READ COMMITTED; }
32-
step stto { SET statement_timeout = '10ms'; SET transaction_timeout = '1s'; }
33-
step tsto { SET statement_timeout = '1s'; SET transaction_timeout = '10ms'; }
34-
step s3_sleep { SELECT pg_sleep(0.1); }
35-
step s3_abort { ABORT; }
36-
37-
session s4
38-
step s4_begin { BEGIN ISOLATION LEVEL READ COMMITTED; }
39-
step itto { SET idle_in_transaction_session_timeout = '10ms'; SET transaction_timeout = '1s'; }
40-
41-
session s5
42-
step s5_begin { BEGIN ISOLATION LEVEL READ COMMITTED; }
43-
step tito { SET idle_in_transaction_session_timeout = '1s'; SET transaction_timeout = '10ms'; }
44-
45-
session s6
46-
step s6_begin { BEGIN ISOLATION LEVEL READ COMMITTED; }
47-
step s6_tt { SET statement_timeout = '1s'; SET transaction_timeout = '10ms'; }
48-
49-
session checker
50-
step checker_sleep { SELECT pg_sleep(0.1); }
51-
step s3_check { SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s3'; }
52-
step s4_check { SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s4'; }
53-
step s5_check { SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s5'; }
54-
step s6_check { SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s6'; }
55-
56-
5730
# It's possible that the isolation tester will not observe the final
5831
# steps as "waiting", thanks to the relatively short timeouts we use.
5932
# We can ensure consistent test output by marking those steps with (*).
@@ -74,14 +47,3 @@ permutation wrtbl lto update(*)
7447
permutation wrtbl lsto update(*)
7548
# statement timeout expires first, row-level lock
7649
permutation wrtbl slto update(*)
77-
78-
# statement timeout expires first
79-
permutation stto s3_begin s3_sleep s3_check s3_abort
80-
# transaction timeout expires first, session s3 FATAL-out
81-
permutation tsto s3_begin checker_sleep s3_check
82-
# idle in transaction timeout expires first, session s4 FATAL-out
83-
permutation itto s4_begin checker_sleep s4_check
84-
# transaction timeout expires first, session s5 FATAL-out
85-
permutation tito s5_begin checker_sleep s5_check
86-
# transaction timeout can be schedule amid transaction, session s6 FATAL-out
87-
permutation s6_begin s6_tt checker_sleep s6_check

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy