Skip to content

Commit 2392566

Browse files
author
MarcoFalke
committed
Merge #18563: test: Fix unregister_all_during_call cleanup
13d2a33 Fix unregister_all_during_call cleanup (Russell Yanofsky) Pull request description: Use `TestingSetup` fixture to fix `unregister_all_during_call` test not calling `UnregisterBackgroundSignalScheduler`, which could trigger an assert in `RegisterBackgroundSignalScheduler` when called in later tests Failure reported by fanquake bitcoin/bitcoin#18551 (comment) ACKs for top commit: MarcoFalke: ACK 13d2a33 if appveyor unit tests pass Tree-SHA512: d2ec8ff14c54d97903af50031abfac1f38ec1c3aabc90371cfd5b79481fa69d3d77f339bfdf7d2178fd85e83402f72eda7cf4d339e5bbfa7e6e1a68836643b93
2 parents b3c3d9a + 13d2a33 commit 2392566

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/test/validationinterface_tests.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
#include <boost/test/unit_test.hpp>
6-
76
#include <consensus/validation.h>
87
#include <primitives/block.h>
98
#include <scheduler.h>
9+
#include <test/util/setup_common.h>
1010
#include <util/check.h>
1111
#include <validationinterface.h>
1212

13-
BOOST_AUTO_TEST_SUITE(validationinterface_tests)
13+
BOOST_FIXTURE_TEST_SUITE(validationinterface_tests, TestingSetup)
1414

1515
class TestInterface : public CValidationInterface
1616
{
@@ -43,9 +43,6 @@ class TestInterface : public CValidationInterface
4343
BOOST_AUTO_TEST_CASE(unregister_all_during_call)
4444
{
4545
bool destroyed = false;
46-
47-
CScheduler scheduler;
48-
GetMainSignals().RegisterBackgroundSignalScheduler(scheduler);
4946
RegisterSharedValidationInterface(std::make_shared<TestInterface>(
5047
[&] {
5148
// First call should decrements reference count 2 -> 1

0 commit comments

Comments
 (0)