Remove flaky isolation tests for timeouts

51efe38cb9 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
This commit is contained in:
Alexander Korotkov 2024-02-25 20:00:03 +02:00
parent 874d817baa
commit a661bf7b0f
2 changed files with 2 additions and 117 deletions

View File

@ -1,4 +1,4 @@
Parsed test spec with 7 sessions
Parsed test spec with 2 sessions
starting permutation: rdtbl sto locktbl
step rdtbl: SELECT * FROM accounts;
@ -79,80 +79,3 @@ step slto: SET lock_timeout = '10s'; SET statement_timeout = '10ms';
step update: DELETE FROM accounts WHERE accountid = 'checking'; <waiting ...>
step update: <... completed>
ERROR: canceling statement due to statement timeout
starting permutation: stto s3_begin s3_sleep s3_check s3_abort
step stto: SET statement_timeout = '10ms'; SET transaction_timeout = '1s';
step s3_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
step s3_sleep: SELECT pg_sleep(0.1);
ERROR: canceling statement due to statement timeout
step s3_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s3';
count
-----
1
(1 row)
step s3_abort: ABORT;
starting permutation: tsto s3_begin checker_sleep s3_check
step tsto: SET statement_timeout = '1s'; SET transaction_timeout = '10ms';
step s3_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
step checker_sleep: SELECT pg_sleep(0.1);
pg_sleep
--------
(1 row)
step s3_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s3';
count
-----
0
(1 row)
starting permutation: itto s4_begin checker_sleep s4_check
step itto: SET idle_in_transaction_session_timeout = '10ms'; SET transaction_timeout = '1s';
step s4_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
step checker_sleep: SELECT pg_sleep(0.1);
pg_sleep
--------
(1 row)
step s4_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s4';
count
-----
0
(1 row)
starting permutation: tito s5_begin checker_sleep s5_check
step tito: SET idle_in_transaction_session_timeout = '1s'; SET transaction_timeout = '10ms';
step s5_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
step checker_sleep: SELECT pg_sleep(0.1);
pg_sleep
--------
(1 row)
step s5_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s5';
count
-----
0
(1 row)
starting permutation: s6_begin s6_tt checker_sleep s6_check
step s6_begin: BEGIN ISOLATION LEVEL READ COMMITTED;
step s6_tt: SET statement_timeout = '1s'; SET transaction_timeout = '10ms';
step checker_sleep: SELECT pg_sleep(0.1);
pg_sleep
--------
(1 row)
step s6_check: SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s6';
count
-----
0
(1 row)

View File

@ -1,4 +1,4 @@
# Simple tests for statement_timeout, lock_timeout and transaction_timeout features
# Simple tests for statement_timeout and lock_timeout features
setup
{
@ -27,33 +27,6 @@ step locktbl { LOCK TABLE accounts; }
step update { DELETE FROM accounts WHERE accountid = 'checking'; }
teardown { ABORT; }
session s3
step s3_begin { BEGIN ISOLATION LEVEL READ COMMITTED; }
step stto { SET statement_timeout = '10ms'; SET transaction_timeout = '1s'; }
step tsto { SET statement_timeout = '1s'; SET transaction_timeout = '10ms'; }
step s3_sleep { SELECT pg_sleep(0.1); }
step s3_abort { ABORT; }
session s4
step s4_begin { BEGIN ISOLATION LEVEL READ COMMITTED; }
step itto { SET idle_in_transaction_session_timeout = '10ms'; SET transaction_timeout = '1s'; }
session s5
step s5_begin { BEGIN ISOLATION LEVEL READ COMMITTED; }
step tito { SET idle_in_transaction_session_timeout = '1s'; SET transaction_timeout = '10ms'; }
session s6
step s6_begin { BEGIN ISOLATION LEVEL READ COMMITTED; }
step s6_tt { SET statement_timeout = '1s'; SET transaction_timeout = '10ms'; }
session checker
step checker_sleep { SELECT pg_sleep(0.1); }
step s3_check { SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s3'; }
step s4_check { SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s4'; }
step s5_check { SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s5'; }
step s6_check { SELECT count(*) FROM pg_stat_activity WHERE application_name = 'isolation/timeouts/s6'; }
# It's possible that the isolation tester will not observe the final
# steps as "waiting", thanks to the relatively short timeouts we use.
# We can ensure consistent test output by marking those steps with (*).
@ -74,14 +47,3 @@ permutation wrtbl lto update(*)
permutation wrtbl lsto update(*)
# statement timeout expires first, row-level lock
permutation wrtbl slto update(*)
# statement timeout expires first
permutation stto s3_begin s3_sleep s3_check s3_abort
# transaction timeout expires first, session s3 FATAL-out
permutation tsto s3_begin checker_sleep s3_check
# idle in transaction timeout expires first, session s4 FATAL-out
permutation itto s4_begin checker_sleep s4_check
# transaction timeout expires first, session s5 FATAL-out
permutation tito s5_begin checker_sleep s5_check
# transaction timeout can be schedule amid transaction, session s6 FATAL-out
permutation s6_begin s6_tt checker_sleep s6_check