diff options
Diffstat (limited to 'test/walpersist.test')
-rw-r--r-- | test/walpersist.test | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/test/walpersist.test b/test/walpersist.test index 175dcbf89..bf65bd1e1 100644 --- a/test/walpersist.test +++ b/test/walpersist.test @@ -67,7 +67,25 @@ do_test walpersist-1.11 { list [file exists test.db] [file exists test.db-wal] [file exists test.db-shm] } {1 1 1} - - +# Make sure the journal_size_limit works to limit the size of the +# persisted wal file. +forcedelete test.db test.db-shm test.db-wal +do_test walpersist-2.1 { + sqlite3 db test.db + db eval { + PRAGMA journal_mode=WAL; + PRAGMA wal_autocheckpoint=OFF; + PRAGMA journal_size_limit=12000; + CREATE TABLE t1(x); + INSERT INTO t1 VALUES(randomblob(50000)); + UPDATE t1 SET x=randomblob(50000); + } + expr {[file size test.db-wal]>100000} +} {1} +do_test walpersist-2.2 { + file_control_persist_wal db 1 + db close + file size test.db-wal +} {12000} finish_test |