Skip to content

Commit

Permalink
Fix flush test in test_async.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
gabime committed Mar 24, 2024
1 parent ec661f9 commit a19c76a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> errmsgs;
{
Expand Down Expand Up @@ -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]") {
Expand Down

0 comments on commit a19c76a

Please sign in to comment.