diff --git a/tests/test_async.cpp b/tests/test_async.cpp index 4a365d2e..919ffac2 100644 --- a/tests/test_async.cpp +++ b/tests/test_async.cpp @@ -98,7 +98,7 @@ TEST_CASE("multithread flush", "[async]") { size_t queue_size = 2; size_t messages = 10; size_t n_threads = 10; - size_t flush_count = 2048; + size_t flush_count = 1024; std::mutex mtx; std::vector errmsgs; { @@ -132,8 +132,10 @@ TEST_CASE("multithread flush", "[async]") { } REQUIRE(test_sink->flush_counter() >= 1); REQUIRE(test_sink->flush_counter() + errmsgs.size() == n_threads * flush_count); - REQUIRE(errmsgs.size() >= 1); - REQUIRE(errmsgs[0] == "Broken promise"); + + if (errmsgs.size() > 0) { + REQUIRE(errmsgs[0] == "Broken promise"); + } } TEST_CASE("async periodic flush", "[async]") {