From 21acf4b4b9f2d06dfceed567a563d9c3b321f927 Mon Sep 17 00:00:00 2001 From: odygrd Date: Mon, 11 Nov 2024 20:33:40 +0000 Subject: [PATCH] add test case with queue reallocation --- test/integration_tests/MultiFrontendThreadsTest.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration_tests/MultiFrontendThreadsTest.cpp b/test/integration_tests/MultiFrontendThreadsTest.cpp index 77c651e7..9838289e 100644 --- a/test/integration_tests/MultiFrontendThreadsTest.cpp +++ b/test/integration_tests/MultiFrontendThreadsTest.cpp @@ -39,9 +39,9 @@ TEST_CASE("multi_frontend_threads_with_queue_reallocation") static constexpr char const* filename = "multi_frontend_threads_with_queue_reallocation.log"; static std::string const logger_name_prefix = "logger_"; - // Start the logging backend thread + // Start the logging backend thread with a bit of delay BackendOptions bo; - bo.sleep_duration = std::chrono::seconds {1}; + bo.sleep_duration = std::chrono::seconds{20}; Backend::start(); std::vector threads; @@ -84,6 +84,7 @@ TEST_CASE("multi_frontend_threads_with_queue_reallocation") elem.join(); } + // Wake up the backend thread after all other threads finished Backend::notify(); // flush all log and remove all loggers