Skip to content

Commit

Permalink
Refs #21120. Improve test sample_lost_be_dw_be_dr_fragments.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <[email protected]>
  • Loading branch information
MiguelCompany committed Jun 7, 2024
1 parent 258078d commit a654f89
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/blackbox/common/DDSBlackboxTestsListeners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <fastdds/dds/domain/DomainParticipantFactory.hpp>
#include <fastdds/LibrarySettings.hpp>
#include <fastdds/rtps/transport/test_UDPv4TransportDescriptor.h>
#include <fastdds/rtps/transport/UDPv4TransportDescriptor.h>
#include <rtps/messages/CDRMessage.hpp>

#include "BlackboxTests.hpp"
Expand Down Expand Up @@ -777,7 +778,13 @@ void sample_lost_test_dr_init(
PubSubReader<T>& reader,
std::function<void(const eprosima::fastdds::dds::SampleLostStatus& status)> functor)
{
reader.sample_lost_status_functor(functor)
auto udp_transport = std::make_shared<UDPv4TransportDescriptor>();
udp_transport->sendBufferSize = SAMPLE_LOST_TEST_BUFFER_SIZE;
udp_transport->receiveBufferSize = SAMPLE_LOST_TEST_BUFFER_SIZE;

reader.disable_builtin_transport()
.add_user_transport_to_pparams(udp_transport)
.sample_lost_status_functor(functor)
.init();

ASSERT_TRUE(reader.isInitialized());
Expand Down

0 comments on commit a654f89

Please sign in to comment.