Skip to content

Commit

Permalink
Refs #21313: Fix failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: eduponz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz committed Jul 24, 2024
1 parent 1aa76e4 commit 6bc41e5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ class RTPSParticipantImpl
bool ret = createWriter_mock(writer, param, hist, listen, entityId, isBuiltin);
if (*writer != nullptr)
{
(*writer)->history_ = hist;

auto guid = generate_endpoint_guid();
(*writer)->m_guid = guid;
endpoints_.emplace(guid, *writer);
}
return ret;
Expand All @@ -199,7 +202,10 @@ class RTPSParticipantImpl
bool ret = createWriter_mock(writer, param, hist, listen, entityId, isBuiltin);
if (*writer != nullptr)
{
(*writer)->history_ = hist;

auto guid = generate_endpoint_guid();
(*writer)->m_guid = guid;
endpoints_.emplace(guid, *writer);
}
return ret;
Expand All @@ -217,7 +223,11 @@ class RTPSParticipantImpl
bool ret = createReader_mock(reader, param, hist, listen, entityId, isBuiltin, enable);
if (*reader != nullptr)
{
(*reader)->history_ = hist;
fastdds::rtps::BaseReader::downcast(*reader)->listener_ = listen;

auto guid = generate_endpoint_guid();
(*reader)->m_guid = guid;
endpoints_.emplace(guid, *reader);
}
return ret;
Expand All @@ -236,7 +246,11 @@ class RTPSParticipantImpl
bool ret = createReader_mock(reader, param, hist, listen, entityId, isBuiltin, enable);
if (*reader != nullptr)
{
(*reader)->history_ = hist;
fastdds::rtps::BaseReader::downcast(*reader)->listener_ = listen;

auto guid = generate_endpoint_guid();
(*reader)->m_guid = guid;
endpoints_.emplace(guid, *reader);
}
return ret;
Expand Down
6 changes: 6 additions & 0 deletions test/unittest/rtps/flowcontrol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ target_compile_definitions(FlowControllerFactoryTests PRIVATE
target_include_directories(FlowControllerFactoryTests PRIVATE
${Asio_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSWriter
${PROJECT_SOURCE_DIR}/test/mock/rtps/Endpoint
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSReader
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSMessageGroup
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSParticipantImpl
${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include
Expand Down Expand Up @@ -86,6 +88,8 @@ target_compile_definitions(FlowControllerPublishModesTests PRIVATE
target_include_directories(FlowControllerPublishModesTests PRIVATE
${Asio_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSWriter
${PROJECT_SOURCE_DIR}/test/mock/rtps/Endpoint
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSReader
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSMessageGroup
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSParticipantImpl
${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include
Expand Down Expand Up @@ -118,6 +122,8 @@ target_compile_definitions(FlowControllerSchedulersTests PRIVATE
target_include_directories(FlowControllerSchedulersTests PRIVATE
${Asio_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSWriter
${PROJECT_SOURCE_DIR}/test/mock/rtps/Endpoint
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSReader
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSMessageGroup
${PROJECT_SOURCE_DIR}/test/mock/rtps/RTPSParticipantImpl
${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/include
Expand Down

0 comments on commit 6bc41e5

Please sign in to comment.