aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2011-07-19 13:07:16 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2011-07-19 13:07:16 -0400
commitd6db0e4e0e382cd5683a767424d05a0361af232a (patch)
tree7e313f80ee71e32dc8d83a5a780f45e90b61a98e
parenta0eae1a2eeb6c0e9deffeccad2f9921d8e561fb5 (diff)
downloadpostgresql-d6db0e4e0e382cd5683a767424d05a0361af232a.tar.gz
postgresql-d6db0e4e0e382cd5683a767424d05a0361af232a.zip
Increase deadlock_timeout to 100ms in FK isolation tests
The previous value of 20ms is dangerously close to the time actually spent just waiting for the deadlock to happen, so on occasion it causes the test to fail simply because the other session didn't get to run early enough, not managing to cause the deadlock that needs to be detected. With this new value, it's expected that most machines on normal load will be able to pass the test. Author: Noah Misch
-rw-r--r--src/test/isolation/specs/fk-deadlock.spec2
-rw-r--r--src/test/isolation/specs/fk-deadlock2.spec2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/isolation/specs/fk-deadlock.spec b/src/test/isolation/specs/fk-deadlock.spec
index b533d77e0bc..9f46c6b665c 100644
--- a/src/test/isolation/specs/fk-deadlock.spec
+++ b/src/test/isolation/specs/fk-deadlock.spec
@@ -19,7 +19,7 @@ teardown
}
session "s1"
-setup { BEGIN; SET deadlock_timeout = '20ms'; }
+setup { BEGIN; SET deadlock_timeout = '100ms'; }
step "s1i" { INSERT INTO child VALUES (1, 1); }
step "s1u" { UPDATE parent SET aux = 'bar'; }
step "s1c" { COMMIT; }
diff --git a/src/test/isolation/specs/fk-deadlock2.spec b/src/test/isolation/specs/fk-deadlock2.spec
index 5653628cf7c..a8f1516c4ec 100644
--- a/src/test/isolation/specs/fk-deadlock2.spec
+++ b/src/test/isolation/specs/fk-deadlock2.spec
@@ -24,7 +24,7 @@ teardown
}
session "s1"
-setup { BEGIN; SET deadlock_timeout = '20ms'; }
+setup { BEGIN; SET deadlock_timeout = '100ms'; }
step "s1u1" { UPDATE A SET Col1 = 1 WHERE AID = 1; }
step "s1u2" { UPDATE B SET Col2 = 1 WHERE BID = 2; }
step "s1c" { COMMIT; }