From 41f891da508114f1fd4df30b4068073ec30abc2a Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Wed, 7 Apr 2021 20:55:09 -0400 Subject: 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. --- test/functional/test_framework/util.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/functional/test_framework/util.py') 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) -- cgit v1.2.3