#include <common/system.h>
#include <logging.h>
#include <random.h>
#include <util/string.h>
#include <util/threadpool.h>
#include <util/time.h>
#include <boost/test/unit_test.hpp>
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 40 of file threadpool_tests.cpp.
◆ BlockWorkers()
| std::vector< std::future< void > > BlockWorkers |
( |
ThreadPool & |
threadPool, |
|
|
const std::shared_future< void > & |
blocker_future, |
|
|
int |
num_of_threads_to_block |
|
) |
| |
◆ BOOST_AUTO_TEST_CASE() [1/11]
| BOOST_AUTO_TEST_CASE |
( |
congestion_more_workers_than_cores |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [2/11]
| BOOST_AUTO_TEST_CASE |
( |
get_result_from_completed_task |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [3/11]
| BOOST_AUTO_TEST_CASE |
( |
interrupt_blocks_new_submissions |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [4/11]
| BOOST_AUTO_TEST_CASE |
( |
process_tasks_manually_when_workers_busy |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [5/11]
| BOOST_AUTO_TEST_CASE |
( |
recursive_task_submission |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [6/11]
| BOOST_AUTO_TEST_CASE |
( |
single_available_worker_executes_all_tasks |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [7/11]
| BOOST_AUTO_TEST_CASE |
( |
submit_task_before_start_fails |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [8/11]
| BOOST_AUTO_TEST_CASE |
( |
submit_tasks_complete_successfully |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [9/11]
| BOOST_AUTO_TEST_CASE |
( |
task_exception_propagates_to_future |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [10/11]
| BOOST_AUTO_TEST_CASE |
( |
task_submitted_while_busy_completes |
| ) |
|
◆ BOOST_AUTO_TEST_CASE() [11/11]
| BOOST_AUTO_TEST_CASE |
( |
wait_for_task_to_finish |
| ) |
|
◆ NUM_WORKERS_DEFAULT
| int NUM_WORKERS_DEFAULT = 0 |
◆ POOL_NAME
| constexpr char POOL_NAME[] = "test" |
|
constexpr |
◆ WAIT_TIMEOUT
| constexpr auto WAIT_TIMEOUT = 120s |
|
constexpr |