Persistent Testing
By default, all tests are run in in-memory mode (unless --force-storage is enabled). In certain cases, we want to force the usage of a persistent database. We can initiate a persistent database using the load command, and trigger a reload of the database using the restart command.
# load the DB from diskload __TEST_DIR__/storage_scan.db
statement okCREATE TABLE test (a INTEGER);
statement okINSERT INTO test VALUES (11), (12), (13), (14), (15), (NULL)
# ...
restart
query ISELECT * FROM test ORDER BY a----NULL1112131415Note that by default the tests run with SET wal_autocheckpoint = '0KB' – meaning a checkpoint is triggered after every statement. WAL tests typically run with the following settings to disable this behavior:
statement okPRAGMA disable_checkpoint_on_shutdown
statement okPRAGMA wal_autocheckpoint = '1TB'