Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d6db0e4

Browse files
committed
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
1 parent a0eae1a commit d6db0e4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/isolation/specs/fk-deadlock.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ teardown
1919
}
2020

2121
session "s1"
22-
setup { BEGIN; SET deadlock_timeout = '20ms'; }
22+
setup { BEGIN; SET deadlock_timeout = '100ms'; }
2323
step "s1i" { INSERT INTO child VALUES (1, 1); }
2424
step "s1u" { UPDATE parent SET aux = 'bar'; }
2525
step "s1c" { COMMIT; }

src/test/isolation/specs/fk-deadlock2.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ teardown
2424
}
2525

2626
session "s1"
27-
setup { BEGIN; SET deadlock_timeout = '20ms'; }
27+
setup { BEGIN; SET deadlock_timeout = '100ms'; }
2828
step "s1u1" { UPDATE A SET Col1 = 1 WHERE AID = 1; }
2929
step "s1u2" { UPDATE B SET Col2 = 1 WHERE BID = 2; }
3030
step "s1c" { COMMIT; }

0 commit comments

Comments
 (0)