Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita661bf7

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 someslow buildfarm machines, so we plan to replace them with TAP tests usinginjection points. This commit removes flaky tests.Discussion:https://postgr.es/m/CAAhFRxiQsRs2Eq5kCo9nXE3HTugsAAJdSQSmxncivebAxdmBjQ%40mail.gmail.comAuthor: Andrey Borodin
1 parent874d817 commita661bf7

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 with7 sessions
1+
Parsed test spec with2 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_timeoutandtransaction_timeout features
1+
# Simple tests for statement_timeoutandlock_timeout features
22

33
setup
44
{
@@ -27,33 +27,6 @@ step locktbl{ LOCK TABLE accounts; }
2727
stepupdate{DELETEFROMaccountsWHEREaccountid='checking'; }
2828
teardown{ABORT; }
2929

30-
sessions3
31-
steps3_begin{BEGINISOLATIONLEVELREADCOMMITTED; }
32-
stepstto{SETstatement_timeout='10ms';SETtransaction_timeout='1s'; }
33-
steptsto{SETstatement_timeout='1s';SETtransaction_timeout='10ms'; }
34-
steps3_sleep{SELECTpg_sleep(0.1); }
35-
steps3_abort{ABORT; }
36-
37-
sessions4
38-
steps4_begin{BEGINISOLATIONLEVELREADCOMMITTED; }
39-
stepitto{SETidle_in_transaction_session_timeout='10ms';SETtransaction_timeout='1s'; }
40-
41-
sessions5
42-
steps5_begin{BEGINISOLATIONLEVELREADCOMMITTED; }
43-
steptito{SETidle_in_transaction_session_timeout='1s';SETtransaction_timeout='10ms'; }
44-
45-
sessions6
46-
steps6_begin{BEGINISOLATIONLEVELREADCOMMITTED; }
47-
steps6_tt{SETstatement_timeout='1s';SETtransaction_timeout='10ms'; }
48-
49-
sessionchecker
50-
stepchecker_sleep{SELECTpg_sleep(0.1); }
51-
steps3_check{SELECTcount(*)FROMpg_stat_activityWHEREapplication_name='isolation/timeouts/s3'; }
52-
steps4_check{SELECTcount(*)FROMpg_stat_activityWHEREapplication_name='isolation/timeouts/s4'; }
53-
steps5_check{SELECTcount(*)FROMpg_stat_activityWHEREapplication_name='isolation/timeouts/s5'; }
54-
steps6_check{SELECTcount(*)FROMpg_stat_activityWHEREapplication_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
permutationwrtbllstoupdate(*)
7548
# statement timeout expires first, row-level lock
7649
permutationwrtblsltoupdate(*)
77-
78-
# statement timeout expires first
79-
permutationsttos3_begins3_sleeps3_checks3_abort
80-
# transaction timeout expires first, session s3 FATAL-out
81-
permutationtstos3_beginchecker_sleeps3_check
82-
# idle in transaction timeout expires first, session s4 FATAL-out
83-
permutationittos4_beginchecker_sleeps4_check
84-
# transaction timeout expires first, session s5 FATAL-out
85-
permutationtitos5_beginchecker_sleeps5_check
86-
# transaction timeout can be schedule amid transaction, session s6 FATAL-out
87-
permutations6_begins6_ttchecker_sleeps6_check

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp