diff --git a/src/test/checkqueue_tests.cpp b/src/test/checkqueue_tests.cpp index e99a8802808..012b0eb321c 100644 --- a/src/test/checkqueue_tests.cpp +++ b/src/test/checkqueue_tests.cpp @@ -109,9 +109,7 @@ struct FrozenCleanupCheck { static std::atomic nFrozen; static std::condition_variable cv; static std::mutex m; - // Freezing can't be the default initialized behavior given how the queue - // swaps in default initialized Checks. - bool should_freeze {false}; + bool should_freeze{true}; bool operator()() const { return true; @@ -344,10 +342,6 @@ BOOST_AUTO_TEST_CASE(test_CheckQueue_FrozenCleanup) std::thread t0([&]() { CCheckQueueControl control(queue.get()); std::vector vChecks(1); - // Freezing can't be the default initialized behavior given how the queue - // swaps in default initialized Checks (otherwise freezing destructor - // would get called twice). - vChecks[0].should_freeze = true; control.Add(std::move(vChecks)); bool waitResult = control.Wait(); // Hangs here assert(waitResult);