[Bug/Feature] N/A
[Cause] SERIALIZATION_ERROR may also be returned when peer disconnects
[Solution] N/A
[Verification] Build, install, run tests
Change-Id: Ifaf67828796cfa0def8d5f56dc926314abb2d36b
// Wait for the response
std::unique_lock<std::mutex> lock(mutex);
- BOOST_CHECK(cv.wait_for(lock, std::chrono::seconds(10), [&retStatus]() {
+ BOOST_CHECK(cv.wait_for(lock, std::chrono::seconds(100), [&retStatus]() {
return retStatus != ipc::Status::UNDEFINED;
}));
- BOOST_CHECK(retStatus == ipc::Status::PEER_DISCONNECTED); //TODO it fails from time to time
+
+ // The disconnection might have happened:
+ // - after sending the message (PEER_DISCONNECTED)
+ // - during external serialization (SERIALIZATION_ERROR)
+ BOOST_CHECK(retStatus == ipc::Status::PEER_DISCONNECTED || retStatus == ipc::Status::SERIALIZATION_ERROR);
}