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. --- src/wallet/test/wallet_tests.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/wallet/test/wallet_tests.cpp') diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index ba2e17d62a..c6bce20394 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -695,6 +695,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_descriptor_test, BasicTestingSetup) //! rescanning where new transactions in new blocks could be lost. BOOST_FIXTURE_TEST_CASE(CreateWallet, TestChain100Setup) { + gArgs.ForceSetArg("-unsafesqlitesync", "1"); // Create new wallet with known key and unload it. auto wallet = TestLoadWallet(*m_node.chain); CKey key; @@ -790,6 +791,7 @@ BOOST_FIXTURE_TEST_CASE(CreateWallet, TestChain100Setup) BOOST_FIXTURE_TEST_CASE(ZapSelectTx, TestChain100Setup) { + gArgs.ForceSetArg("-unsafesqlitesync", "1"); auto wallet = TestLoadWallet(*m_node.chain); CKey key; key.MakeNewKey(true); -- cgit v1.2.3