From f69441b6339f79fae29c969f54f6cd687077a2eb Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 1 Apr 2023 15:22:13 +0200 Subject: [PATCH] Fix ThreadPool usage in gtest_thread_pool_limit Signed-off-by: Azat Khuzhin --- src/Common/tests/gtest_thread_pool_limit.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Common/tests/gtest_thread_pool_limit.cpp b/src/Common/tests/gtest_thread_pool_limit.cpp index bc67ffd0bc1..17f79d17894 100644 --- a/src/Common/tests/gtest_thread_pool_limit.cpp +++ b/src/Common/tests/gtest_thread_pool_limit.cpp @@ -1,16 +1,23 @@ #include #include #include +#include #include +namespace CurrentMetrics +{ + extern const Metric LocalThread; + extern const Metric LocalThreadActive; +} + /// Test for thread self-removal when number of free threads in pool is too large. /// Just checks that nothing weird happens. template int test() { - Pool pool(10, 2, 10); + Pool pool(CurrentMetrics::LocalThread, CurrentMetrics::LocalThreadActive, 10, 2, 10); std::atomic counter{0}; for (size_t i = 0; i < 10; ++i)