aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2024-02-25 20:00:03 +0200
committerAlexander Korotkov <akorotkov@postgresql.org>2024-02-25 20:20:04 +0200
commita661bf7b0f56dd8bc298309de9937081ef485370 (patch)
tree43d610f2ac78c9023edfa81568050bd381e8a910 /src
parent874d817baa160ca7e68bee6ccc9fc1848c56e750 (diff)
downloadpostgresql-a661bf7b0f56dd8bc298309de9937081ef485370.tar.gz
postgresql-a661bf7b0f56dd8bc298309de9937081ef485370.zip
Remove flaky isolation tests for timeouts
51efe38cb92f 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
Diffstat (limited to 'src')
-rw-r--r--src/test/isolation/expected/timeouts.out79
-rw-r--r--src/test/isolation/specs/timeouts.spec40
2 files changed, 2 insertions, 117 deletions
diff --git a/src/test/isolation/expected/timeouts.out b/src/test/isolation/expected/timeouts.out
index 81a0016375b..9328676f1cc 100644
--- a/src/test/isolation/expected/timeouts.out
+++ b/src/test/isolation/expected/timeouts.out
@@ -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)
-
diff --git a/src/test/isolation/specs/timeouts.spec b/src/test/isolation/specs/timeouts.spec
index c2cc5d8d37b..c747b4ae28d 100644
--- a/src/test/isolation/specs/timeouts.spec
+++ b/src/test/isolation/specs/timeouts.spec
@@ -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 \ No newline at end of file