aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2021-04-07 20:55:09 -0400
committerAndrew Chow <achow101-github@achow101.com>2021-04-12 19:29:03 -0400
commit41f891da508114f1fd4df30b4068073ec30abc2a (patch)
tree1b3e171dfbc7eadf4d503659e4c973dcc93c3d9d /test
parentcb79cabdd9d9a6d183cf09575dd46925f2c9cb3b (diff)
tests: Skip SQLite fsyncs while testing
Since we want tests to run quickly, and since tests do a lot more db operations than expected we expect to see in actual usage, we disable sqlite's syncing behavior to make db operations run much faster. This syncing behavior is necessary for normal operation as it helps guarantee that data won't become lost or corrupted, but in tests, we don't care about that.
Diffstat (limited to 'test')
-rw-r--r--test/functional/test_framework/util.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index 5c774934be..55166ba0ad 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -374,6 +374,8 @@ def write_config(config_path, *, n, chain, extra_config=""):
f.write("upnp=0\n")
f.write("natpmp=0\n")
f.write("shrinkdebugfile=0\n")
+ # To improve SQLite wallet performance so that the tests don't timeout, use -unsafesqlitesync
+ f.write("unsafesqlitesync=1\n")
f.write(extra_config)