mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 01:29:35 +08:00
@@ -68,7 +68,6 @@ TEST_CASE("discard policy using factory ", "[async]") {
|
||||
}
|
||||
|
||||
REQUIRE(test_sink->msg_counter() < messages);
|
||||
spdlog::drop_all();
|
||||
}
|
||||
|
||||
TEST_CASE("flush", "[async]") {
|
||||
@@ -89,17 +88,6 @@ TEST_CASE("flush", "[async]") {
|
||||
REQUIRE(test_sink->flush_counter() == 1);
|
||||
}
|
||||
|
||||
TEST_CASE("async periodic flush", "[async]") {
|
||||
auto logger = spdlog::create_async<spdlog::sinks::test_sink_mt>("as");
|
||||
auto test_sink = std::static_pointer_cast<spdlog::sinks::test_sink_mt>(logger->sinks()[0]);
|
||||
|
||||
spdlog::flush_every(std::chrono::seconds(1));
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1700));
|
||||
REQUIRE(test_sink->flush_counter() == 1);
|
||||
spdlog::flush_every(std::chrono::seconds(0));
|
||||
spdlog::drop_all();
|
||||
}
|
||||
|
||||
TEST_CASE("tp->wait_empty() ", "[async]") {
|
||||
auto test_sink = std::make_shared<spdlog::sinks::test_sink_mt>();
|
||||
test_sink->set_delay(std::chrono::milliseconds(5));
|
||||
|
Reference in New Issue
Block a user