Put lock logging behind DEBUG_LOCKCONTENTION preprocessor directive

Github-Pull: #24770
Rebased-From: 39a34b6877
This commit is contained in:
Jon Atack
2022-04-01 12:23:01 +02:00
committed by fanquake
parent 1ea76767d0
commit 6374e24887
6 changed files with 18 additions and 6 deletions

View File

@@ -19,13 +19,17 @@
#include <vector>
/**
* Identical to TestingSetup but excludes lock contention logging, as some of
* these tests are designed to be heavily contested to trigger race conditions
* or other issues.
* Identical to TestingSetup 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 {
NoLockLoggingTestingSetup()
#ifdef DEBUG_LOCKCONTENTION
: TestingSetup{CBaseChainParams::MAIN, /*extra_args=*/{"-debugexclude=lock"}} {}
#else
: TestingSetup{CBaseChainParams::MAIN} {}
#endif
};
BOOST_FIXTURE_TEST_SUITE(checkqueue_tests, NoLockLoggingTestingSetup)