Tracking issue for the follow up comments in #22904. It seems that PR has introduced lock contentions, and/or the `checkqueue_tests` are now behaving very poorly, with long runtimes and generating GBs of log output in some cases. See comments starting here: https://github.com/bitcoin/bitcoin/pull/22904#issuecomment-930466935.

cc @ajtowns @theuni @martinus  
{
    auto fail_queue = std::make_unique<Failing_Queue>(QUEUE_BATCH_SIZE);
    fail_queue->StartWorkerThreads(SCRIPT_CHECK_THREADS);
    for (size_t i = 0; i < 1001; ++i) {
        CCheckQueueControl<FailingCheck> control(fail_queue.get());
        size_t remaining = i;
        while (remaining) {
            size_t r = InsecureRandRange(10);
            std::vector<FailingCheck> vChecks;
            vChecks.reserve(r);
            for (size_t k = 0; k < r && remaining; k++, remaining--)
                vChecks.emplace_back(remaining == 1);
            control.Add(vChecks);
        }
        bool success = control.Wait();
        if (i > 0) {
            BOOST_REQUIRE(!success);
        } else if (i == 0) {
            BOOST_REQUIRE(success);
        }
    }
    fail_queue->StopWorkerThreads();
}
BOOST_AUTO_TEST_CASE(test_CheckQueue_Recovers_From_Failure)