|  | Bitcoin Core 22.99.0
    P2P Digital Currency | 
#include <checkqueue.h>#include <sync.h>#include <test/util/setup_common.h>#include <util/system.h>#include <util/time.h>#include <boost/test/unit_test.hpp>#include <atomic>#include <condition_variable>#include <mutex>#include <thread>#include <unordered_set>#include <utility>#include <vector>Go to the source code of this file.
| Classes | |
| struct | NoLockLoggingTestingSetup | 
| 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.  More... | |
| struct | FakeCheck | 
| struct | FakeCheckCheckCompletion | 
| struct | FailingCheck | 
| struct | UniqueCheck | 
| struct | MemoryCheck | 
| struct | FrozenCleanupCheck | 
| Typedefs | |
| typedef CCheckQueue< FakeCheckCheckCompletion > | Correct_Queue | 
| typedef CCheckQueue< FakeCheck > | Standard_Queue | 
| typedef CCheckQueue< FailingCheck > | Failing_Queue | 
| typedef CCheckQueue< UniqueCheck > | Unique_Queue | 
| typedef CCheckQueue< MemoryCheck > | Memory_Queue | 
| typedef CCheckQueue< FrozenCleanupCheck > | FrozenCleanup_Queue | 
| Functions | |
| static void | Correct_Queue_range (std::vector< size_t > range) | 
| This test case checks that the CCheckQueue works properly with each specified size_t Checks pushed.  More... | |
| BOOST_AUTO_TEST_CASE (test_CheckQueue_Correct_Zero) | |
| Test that 0 checks is correct.  More... | |
| BOOST_AUTO_TEST_CASE (test_CheckQueue_Correct_One) | |
| Test that 1 check is correct.  More... | |
| BOOST_AUTO_TEST_CASE (test_CheckQueue_Correct_Max) | |
| Test that MAX check is correct.  More... | |
| BOOST_AUTO_TEST_CASE (test_CheckQueue_Correct_Random) | |
| Test that random numbers of checks are correct.  More... | |
| BOOST_AUTO_TEST_CASE (test_CheckQueue_Catches_Failure) | |
| Test that failing checks are caught.  More... | |
| BOOST_AUTO_TEST_CASE (test_CheckQueue_Recovers_From_Failure) | |
| BOOST_AUTO_TEST_CASE (test_CheckQueue_UniqueCheck) | |
| BOOST_AUTO_TEST_CASE (test_CheckQueue_Memory) | |
| BOOST_AUTO_TEST_CASE (test_CheckQueue_FrozenCleanup) | |
| BOOST_AUTO_TEST_CASE (test_CheckQueueControl_Locks) | |
| Test that CCheckQueueControl is threadsafe.  More... | |
| Variables | |
| static const unsigned int | QUEUE_BATCH_SIZE = 128 | 
| static const int | SCRIPT_CHECK_THREADS = 3 | 
Definition at line 145 of file checkqueue_tests.cpp.
| typedef CCheckQueue<FailingCheck> Failing_Queue | 
Definition at line 147 of file checkqueue_tests.cpp.
Definition at line 150 of file checkqueue_tests.cpp.
| typedef CCheckQueue<MemoryCheck> Memory_Queue | 
Definition at line 149 of file checkqueue_tests.cpp.
| typedef CCheckQueue<FakeCheck> Standard_Queue | 
Definition at line 146 of file checkqueue_tests.cpp.
| typedef CCheckQueue<UniqueCheck> Unique_Queue | 
Definition at line 148 of file checkqueue_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueue_Catches_Failure | ) | 
Test that failing checks are caught.
Definition at line 216 of file checkqueue_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueue_Correct_Max | ) | 
Test that MAX check is correct.
Definition at line 197 of file checkqueue_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueue_Correct_One | ) | 
Test that 1 check is correct.
Definition at line 189 of file checkqueue_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueue_Correct_Random | ) | 
Test that random numbers of checks are correct.
Definition at line 205 of file checkqueue_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueue_Correct_Zero | ) | 
Test that 0 checks is correct.
Definition at line 181 of file checkqueue_tests.cpp.
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueue_FrozenCleanup | ) | 
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueue_Memory | ) | 
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueue_Recovers_From_Failure | ) | 
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueue_UniqueCheck | ) | 
| BOOST_AUTO_TEST_CASE | ( | test_CheckQueueControl_Locks | ) | 
Test that CCheckQueueControl is threadsafe.
Definition at line 370 of file checkqueue_tests.cpp.
| 
 | static | 
This test case checks that the CCheckQueue works properly with each specified size_t Checks pushed.
Definition at line 156 of file checkqueue_tests.cpp.
| 
 | static | 
Definition at line 33 of file checkqueue_tests.cpp.
| 
 | static | 
Definition at line 34 of file checkqueue_tests.cpp.