mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-15 16:35:45 +08:00
Added async test to tests
This commit is contained in:
parent
989a10e48b
commit
683dc0b216
@ -47,7 +47,6 @@ TEST_CASE("discard policy using factory ", "[async]")
|
|||||||
size_t queue_size = 2;
|
size_t queue_size = 2;
|
||||||
size_t messages = 1024;
|
size_t messages = 1024;
|
||||||
{
|
{
|
||||||
//auto tp = std::make_shared<details::thread_pool>(queue_size, 1);
|
|
||||||
auto logger = spdlog::create_async_nb<sinks::test_sink_mt>("as2");
|
auto logger = spdlog::create_async_nb<sinks::test_sink_mt>("as2");
|
||||||
for (size_t i = 0; i < messages; i++)
|
for (size_t i = 0; i < messages; i++)
|
||||||
{
|
{
|
||||||
@ -56,8 +55,6 @@ TEST_CASE("discard policy using factory ", "[async]")
|
|||||||
auto sink = std::static_pointer_cast<sinks::test_sink_mt>(logger->sinks()[0]);
|
auto sink = std::static_pointer_cast<sinks::test_sink_mt>(logger->sinks()[0]);
|
||||||
REQUIRE(sink->msg_counter() < messages);
|
REQUIRE(sink->msg_counter() < messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("flush", "[async]")
|
TEST_CASE("flush", "[async]")
|
||||||
|
Loading…
Reference in New Issue
Block a user