Skip to content

Commit

Permalink
iox-#1036 Fix mq startup race test on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Sep 2, 2023
1 parent dd1a8d3 commit 0498e59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ class UnixDomainSocket
using UdsName_t = string<LONGEST_VALID_NAME>;
using Message_t = string<MAX_MESSAGE_SIZE>;

using result_t = expected<UnixDomainSocket, IpcChannelError>;
using errorType_t = IpcChannelError;

UnixDomainSocket() noexcept = delete;
UnixDomainSocket(const UnixDomainSocket& other) = delete;
UnixDomainSocket(UnixDomainSocket&& other) noexcept;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class CMqInterfaceStartupRace_test : public Test
public:
virtual void SetUp()
{
platform::IoxIpcChannelType::create(roudi::IPC_CHANNEL_ROUDI_NAME, IpcChannelSide::SERVER)
.and_then([this](auto& channel) { this->m_roudiQueue.emplace(std::move(channel)); });
ASSERT_THAT(m_roudiQueue.has_value(), true);
}
virtual void TearDown()
Expand Down Expand Up @@ -110,8 +112,7 @@ class CMqInterfaceStartupRace_test : public Test

/// @note smart_lock in combination with optional is currently not really usable
std::mutex m_roudiQueueMutex;
platform::IoxIpcChannelType::result_t m_roudiQueue{
platform::IoxIpcChannelType::create(roudi::IPC_CHANNEL_ROUDI_NAME, IpcChannelSide::SERVER)};
optional<platform::IoxIpcChannelType> m_roudiQueue;
std::mutex m_appQueueMutex;
optional<platform::IoxIpcChannelType> m_appQueue;
};
Expand Down

0 comments on commit 0498e59

Please sign in to comment.