Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/TypedMessageTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ TEST(TypedMessageTest, testReceive) {
ASSERT_EQ(ResultOk, consumer.receive(msg, 3000, intDecoder));
} else {
Latch latch{1};
consumer.receiveAsync(
consumer.receiveAsync<int>(
[&latch, &msg, &msgMutex](Result result, const TypedMessage<int>& receivedMsg) {
ASSERT_EQ(ResultOk, result);
{
std::lock_guard<std::mutex> lock{msgMutex};
msg = TypedMessage<int>{receivedMsg, intDecoder};
msg = receivedMsg;
}
latch.countdown();
});
},
intDecoder);
Comment thread
geniusjoe marked this conversation as resolved.
Outdated
ASSERT_TRUE(latch.wait(std::chrono::seconds(1)));
}

Expand Down