Skip to content

Commit 318c798

Browse files
committed
Disable lowmem flushing in test that needs determinism
1 parent 1a01c95 commit 318c798

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/test/validation_chainstate_tests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
//
55
#include <chainparams.h>
6+
#include <common/system.h>
67
#include <consensus/validation.h>
78
#include <random.h>
89
#include <rpc/blockchain.h>
@@ -24,6 +25,8 @@ BOOST_FIXTURE_TEST_SUITE(validation_chainstate_tests, ChainTestingSetup)
2425
//!
2526
BOOST_AUTO_TEST_CASE(validation_chainstate_resize_caches)
2627
{
28+
g_low_memory_threshold = 0; // disable to get deterministic flushing
29+
2730
ChainstateManager& manager = *Assert(m_node.chainman);
2831
CTxMemPool& mempool = *Assert(m_node.mempool);
2932
Chainstate& c1 = WITH_LOCK(cs_main, return manager.InitializeChainstate(&mempool));

src/wallet/test/wallet_tests.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <vector>
1111

1212
#include <addresstype.h>
13+
#include <common/system.h>
1314
#include <interfaces/chain.h>
1415
#include <key_io.h>
1516
#include <node/blockstorage.h>
@@ -783,6 +784,9 @@ BOOST_FIXTURE_TEST_CASE(wallet_descriptor_test, BasicTestingSetup)
783784
//! rescanning where new transactions in new blocks could be lost.
784785
BOOST_FIXTURE_TEST_CASE(CreateWallet, TestChain100Setup)
785786
{
787+
// FIXME: this test fails for some reason if there's a flush
788+
g_low_memory_threshold = 0;
789+
786790
m_args.ForceSetArg("-unsafesqlitesync", "1");
787791
// Create new wallet with known key and unload it.
788792
WalletContext context;

0 commit comments

Comments
 (0)