Fixed race condition in tests

This commit is contained in:
gabime 2024-11-01 12:32:39 +02:00
parent 85bdab0c18
commit 96c9a62bfd

View File

@ -105,9 +105,9 @@ TEST_CASE("clone-logger", "[clone]") {
} }
TEST_CASE("clone async", "[clone]") { TEST_CASE("clone async", "[clone]") {
using spdlog::sinks::test_sink_st; using spdlog::sinks::test_sink_mt;
spdlog::init_thread_pool(4, 1); spdlog::init_thread_pool(4, 1);
auto test_sink = std::make_shared<test_sink_st>(); auto test_sink = std::make_shared<test_sink_mt>();
auto logger = std::make_shared<spdlog::async_logger>("orig", test_sink, spdlog::thread_pool()); auto logger = std::make_shared<spdlog::async_logger>("orig", test_sink, spdlog::thread_pool());
logger->set_pattern("%v"); logger->set_pattern("%v");
auto cloned = logger->clone("clone"); auto cloned = logger->clone("clone");