aboutsummaryrefslogtreecommitdiff
path: root/src/test/isolation/specs/timeouts.spec
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/isolation/specs/timeouts.spec')
-rw-r--r--src/test/isolation/specs/timeouts.spec28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/test/isolation/specs/timeouts.spec b/src/test/isolation/specs/timeouts.spec
index 7f821d44d0e..e167e1885af 100644
--- a/src/test/isolation/specs/timeouts.spec
+++ b/src/test/isolation/specs/timeouts.spec
@@ -19,27 +19,31 @@ teardown { ABORT; }
session "s2"
setup { BEGIN ISOLATION LEVEL READ COMMITTED; }
-step "sto" { SET statement_timeout = 5000; }
-step "lto" { SET lock_timeout = 5000; }
-step "lsto" { SET lock_timeout = 5000; SET statement_timeout = 6000; }
-step "slto" { SET lock_timeout = 6000; SET statement_timeout = 5000; }
+step "sto" { SET statement_timeout = '10ms'; }
+step "lto" { SET lock_timeout = '10ms'; }
+step "lsto" { SET lock_timeout = '10ms'; SET statement_timeout = '10s'; }
+step "slto" { SET lock_timeout = '10s'; SET statement_timeout = '10ms'; }
step "locktbl" { LOCK TABLE accounts; }
step "update" { DELETE FROM accounts WHERE accountid = 'checking'; }
teardown { ABORT; }
+# 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 (*).
+
# statement timeout, table-level lock
-permutation "rdtbl" "sto" "locktbl"
+permutation "rdtbl" "sto" "locktbl"(*)
# lock timeout, table-level lock
-permutation "rdtbl" "lto" "locktbl"
+permutation "rdtbl" "lto" "locktbl"(*)
# lock timeout expires first, table-level lock
-permutation "rdtbl" "lsto" "locktbl"
+permutation "rdtbl" "lsto" "locktbl"(*)
# statement timeout expires first, table-level lock
-permutation "rdtbl" "slto" "locktbl"
+permutation "rdtbl" "slto" "locktbl"(*)
# statement timeout, row-level lock
-permutation "wrtbl" "sto" "update"
+permutation "wrtbl" "sto" "update"(*)
# lock timeout, row-level lock
-permutation "wrtbl" "lto" "update"
+permutation "wrtbl" "lto" "update"(*)
# lock timeout expires first, row-level lock
-permutation "wrtbl" "lsto" "update"
+permutation "wrtbl" "lsto" "update"(*)
# statement timeout expires first, row-level lock
-permutation "wrtbl" "slto" "update"
+permutation "wrtbl" "slto" "update"(*)