#include <common/system.h>
#include <logging.h>
#include <random.h>
#include <test/util/common.h>
#include <util/string.h>
#include <util/threadpool.h>
#include <util/time.h>
#include <boost/test/unit_test.hpp>
#include <latch>
#include <semaphore>
Go to the source code of this file.
◆ WAIT_FOR
| #define WAIT_FOR |
( |
|
futures | ) |
|
Value: do { \
for (const auto& f : futures) { \
BOOST_REQUIRE(f.wait_for(
WAIT_TIMEOUT) == std::future_status::ready); \
} \
} while (0)
constexpr auto WAIT_TIMEOUT
Definition at line 46 of file threadpool_tests.cpp.
◆ BlockWorkers()
| std::vector< std::future< void > > BlockWorkers |
( |
ThreadPool & |
threadPool, |
|
|
std::counting_semaphore<> & |
release_sem, |
|
|
size_t |
num_of_threads_to_block |
|
) |
| |
◆ BOOST_AUTO_TEST_CASE() [1/14]
| BOOST_AUTO_TEST_CASE |
( |
congestion_more_workers_than_cores |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [2/14]
| BOOST_AUTO_TEST_CASE |
( |
get_result_from_completed_task |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [3/14]
| BOOST_AUTO_TEST_CASE |
( |
interrupt_blocks_new_submissions |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [4/14]
| BOOST_AUTO_TEST_CASE |
( |
process_tasks_manually_when_workers_busy |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [5/14]
| BOOST_AUTO_TEST_CASE |
( |
queued_tasks_complete_after_interrupt |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [6/14]
| BOOST_AUTO_TEST_CASE |
( |
recursive_task_submission |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [7/14]
| BOOST_AUTO_TEST_CASE |
( |
single_available_worker_executes_all_tasks |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [8/14]
| BOOST_AUTO_TEST_CASE |
( |
start_mid_stop_does_not_deadlock |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [9/14]
| BOOST_AUTO_TEST_CASE |
( |
stop_active_wait_drains_queue |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [10/14]
| BOOST_AUTO_TEST_CASE |
( |
submit_fails_with_correct_error |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [11/14]
| BOOST_AUTO_TEST_CASE |
( |
submit_tasks_complete_successfully |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [12/14]
| BOOST_AUTO_TEST_CASE |
( |
task_exception_propagates_to_future |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [13/14]
| BOOST_AUTO_TEST_CASE |
( |
task_submitted_while_busy_completes |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [14/14]
| BOOST_AUTO_TEST_CASE |
( |
wait_for_task_to_finish |
| ) |
|
◆ Submit()
◆ NUM_WORKERS_DEFAULT
| int NUM_WORKERS_DEFAULT = 0 |
◆ POOL_NAME
| constexpr char POOL_NAME[] = "test" |
|
constexpr |
◆ WAIT_TIMEOUT
| constexpr auto WAIT_TIMEOUT = 120s |
|
constexpr |