Skip to content

Commit

Permalink
It is ok if we get more messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-cukic committed Jan 31, 2024
1 parent a3e79a9 commit 38fde91
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/test/qa_Messages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ messageProcessorCounter(std::atomic_size_t &countdown, std::atomic_size_t &total
continue;
}

countdown--;
fmt::print("Got a message, countdown was {}\n", countdown.load());
if (countdown > 0) countdown--;
totalCounter++;

if (!replyMessage.empty()) _this->emitMessage(_this->msgOut, std::move(replyMessage));
Expand Down Expand Up @@ -189,8 +190,9 @@ const boost::ut::suite MessagesTests = [] {
scheduler.runAndWait();
messenger.join();

expect(sourceMessagesCountdown == 1);
expect(sinkMessagesCountdown == 0);
expect(eq(sourceMessagesCountdown.load(), 1UZ));
fmt::print("This is the sinkMessagesCountdown {}\n", sinkMessagesCountdown.load());
expect(eq(sinkMessagesCountdown.load(), 0UZ));
};

// Testing if settings messages work
Expand Down

0 comments on commit 38fde91

Please sign in to comment.