diff options
author | Håvard Pettersen <havardpe@yahooinc.com> | 2023-02-24 12:09:45 +0000 |
---|---|---|
committer | Håvard Pettersen <havardpe@yahooinc.com> | 2023-02-24 12:12:28 +0000 |
commit | a907c35031c5a09fb2fc76080f273ff95e663e65 (patch) | |
tree | d02425c63c06865cea237086897f53b39b2956fb /vespalib/src/tests | |
parent | ea34220e4bc8a9d9bc598cab098e2af893688e4a (diff) |
avoid using fastos thread in storage
Diffstat (limited to 'vespalib/src/tests')
-rw-r--r-- | vespalib/src/tests/thread/thread_test.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vespalib/src/tests/thread/thread_test.cpp b/vespalib/src/tests/thread/thread_test.cpp index cde8a3596bf..077b85ea1ac 100644 --- a/vespalib/src/tests/thread/thread_test.cpp +++ b/vespalib/src/tests/thread/thread_test.cpp @@ -50,9 +50,17 @@ TEST("use thread pool to run multiple things") { bool init_called = false; bool was_run = false; ThreadPool pool; + EXPECT_TRUE(pool.empty()); + EXPECT_EQUAL(pool.size(), 0u); pool.start(my_fun, &was_run); + EXPECT_TRUE(!pool.empty()); + EXPECT_EQUAL(pool.size(), 1u); pool.start(agent, wrap(test_agent_thread, &init_called)); + EXPECT_TRUE(!pool.empty()); + EXPECT_EQUAL(pool.size(), 2u); pool.join(); + EXPECT_TRUE(pool.empty()); + EXPECT_EQUAL(pool.size(), 0u); EXPECT_TRUE(init_called); EXPECT_TRUE(agent.was_run); EXPECT_TRUE(was_run); |