summaryrefslogtreecommitdiff
path: root/test/lock.test
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2013-08-13 15:42:54 -0400
committerHans-Christoph Steiner <hans@eds.org>2013-08-13 15:42:54 -0400
commit08119c361d1181b3e8f1abb429236e488a664753 (patch)
tree77e5a8b6d411ca32c360c7e48df5c293b1e0baac /test/lock.test
parent1b5ba8e022836fa8ab93bc90df1b34a29ea6e134 (diff)
Imported Upstream version 2.2.1
Diffstat (limited to 'test/lock.test')
-rw-r--r--test/lock.test23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/lock.test b/test/lock.test
index 22f359c..6ec85ee 100644
--- a/test/lock.test
+++ b/test/lock.test
@@ -247,11 +247,34 @@ do_test lock-2.8 {
execsql {UPDATE t1 SET a = 0 WHERE 0}
catchsql {BEGIN EXCLUSIVE;} db2
} {1 {database is locked}}
+do_test lock-2.8b {
+ db2 eval {PRAGMA busy_timeout}
+} {400}
do_test lock-2.9 {
db2 timeout 0
execsql COMMIT
} {}
+do_test lock-2.9b {
+ db2 eval {PRAGMA busy_timeout}
+} {0}
integrity_check lock-2.10
+do_test lock-2.11 {
+ db2 eval {PRAGMA busy_timeout(400)}
+ execsql BEGIN
+ execsql {UPDATE t1 SET a = 0 WHERE 0}
+ catchsql {BEGIN EXCLUSIVE;} db2
+} {1 {database is locked}}
+do_test lock-2.11b {
+ db2 eval {PRAGMA busy_timeout}
+} {400}
+do_test lock-2.12 {
+ db2 eval {PRAGMA busy_timeout(0)}
+ execsql COMMIT
+} {}
+do_test lock-2.12b {
+ db2 eval {PRAGMA busy_timeout}
+} {0}
+integrity_check lock-2.13
# Try to start two transactions in a row
#