test: Use BasicTestingSetup when TestingSetup is not necessary

This commit is contained in:
Hodlinator
2026-03-24 09:59:29 +01:00
parent 9ee77701dd
commit 2af003ae37
6 changed files with 9 additions and 9 deletions

View File

@@ -21,16 +21,16 @@
#include <vector>
/**
* Identical to TestingSetup but excludes lock contention logging if
* Identical to BasicTestingSetup but excludes lock contention logging if
* `DEBUG_LOCKCONTENTION` is defined, as some of these tests are designed to be
* heavily contested to trigger race conditions or other issues.
*/
struct NoLockLoggingTestingSetup : public TestingSetup {
struct NoLockLoggingTestingSetup : public BasicTestingSetup {
NoLockLoggingTestingSetup()
#ifdef DEBUG_LOCKCONTENTION
: TestingSetup{ChainType::MAIN, {.extra_args = { "-debugexclude=lock" } }} {}
: BasicTestingSetup{ChainType::MAIN, {.extra_args = { "-debugexclude=lock" } }} {}
#else
: TestingSetup{ChainType::MAIN} {}
: BasicTestingSetup{ChainType::MAIN} {}
#endif
};

View File

@@ -9,7 +9,7 @@
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(merkle_tests, TestingSetup)
BOOST_FIXTURE_TEST_SUITE(merkle_tests, BasicTestingSetup)
static uint256 ComputeMerkleRootFromBranch(const uint256& leaf, const std::vector<uint256>& vMerkleBranch, uint32_t nIndex) {
uint256 hash = leaf;

View File

@@ -20,7 +20,7 @@
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(orphanage_tests, TestingSetup)
BOOST_FIXTURE_TEST_SUITE(orphanage_tests, BasicTestingSetup)
static void MakeNewKeyWithFastRandomContext(CKey& key, FastRandomContext& rand_ctx)
{

View File

@@ -13,7 +13,7 @@
#include <ranges>
#include <vector>
BOOST_FIXTURE_TEST_SUITE(prevector_tests, TestingSetup)
BOOST_FIXTURE_TEST_SUITE(prevector_tests, BasicTestingSetup)
template <unsigned int N, typename T>
class prevector_tester

View File

@@ -14,7 +14,7 @@
#include <optional>
#include <vector>
BOOST_FIXTURE_TEST_SUITE(rbf_tests, TestingSetup)
BOOST_FIXTURE_TEST_SUITE(rbf_tests, BasicTestingSetup)
static inline CTransactionRef make_tx(const std::vector<CTransactionRef>& inputs,
const std::vector<CAmount>& output_values)

View File

@@ -19,7 +19,7 @@
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(validation_tests, TestingSetup)
BOOST_FIXTURE_TEST_SUITE(validation_tests, BasicTestingSetup)
static void TestBlockSubsidyHalvings(const Consensus::Params& consensusParams)
{