From 796d5a64a695c87834d6d9e219be1688eb405f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20P=C3=A9rez?= <78275223+jepemi@users.noreply.github.com> Date: Mon, 22 Jan 2024 15:25:45 +0100 Subject: [PATCH 1/3] Remove unnecessary warning (#4217) Signed-off-by: Jesus Perez (cherry picked from commit ab94226160ce8efa3bd566dbf470eb45682151ed) --- src/cpp/rtps/transport/TCPTransportInterface.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cpp/rtps/transport/TCPTransportInterface.cpp b/src/cpp/rtps/transport/TCPTransportInterface.cpp index 651ba841c50..e4ec8f71ea4 100644 --- a/src/cpp/rtps/transport/TCPTransportInterface.cpp +++ b/src/cpp/rtps/transport/TCPTransportInterface.cpp @@ -1169,9 +1169,6 @@ bool TCPTransportInterface::send( { //std::cout << "ChannelLocator: " << IPLocator::to_string(channel->locator()) << std::endl; //std::cout << "RemoteLocator: " << IPLocator::to_string(remote_locator) << std::endl; - - logWarning(RTCP, "SEND [RTPS] Failed: Not connect: " << IPLocator::getLogicalPort(remote_locator) \ - << " @ IP: " << IPLocator::toIPv4string(remote_locator)); return false; } From d7caded84ff78b884f3d475c4f2ef417ed072b8f Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Mon, 26 Feb 2024 11:14:14 +0100 Subject: [PATCH 2/3] Refs #20485: Fix tests using PubSubParticipant Signed-off-by: Mario Dominguez --- test/blackbox/api/dds-pim/PubSubParticipant.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/test/blackbox/api/dds-pim/PubSubParticipant.hpp b/test/blackbox/api/dds-pim/PubSubParticipant.hpp index 534a6e1e52a..5f2508c0823 100644 --- a/test/blackbox/api/dds-pim/PubSubParticipant.hpp +++ b/test/blackbox/api/dds-pim/PubSubParticipant.hpp @@ -312,6 +312,7 @@ class PubSubParticipant if (participant_ != nullptr) { + participant_qos_ = participant_->get_qos(); type_.reset(new type_support()); participant_->register_type(type_); return true; From 640de794e5a4fb9b850cd1ee1c8a6788a38da780 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Mon, 26 Feb 2024 14:36:41 +0100 Subject: [PATCH 3/3] Refs #20485: PubSubBasic test fix Signed-off-by: Mario Dominguez --- .../common/BlackboxTestsPubSubBasic.cpp | 35 ++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/test/blackbox/common/BlackboxTestsPubSubBasic.cpp b/test/blackbox/common/BlackboxTestsPubSubBasic.cpp index 9ad404be5a1..9f80d08bf9f 100644 --- a/test/blackbox/common/BlackboxTestsPubSubBasic.cpp +++ b/test/blackbox/common/BlackboxTestsPubSubBasic.cpp @@ -544,6 +544,15 @@ TEST_P(PubSubBasic, ReceivedPropertiesDataWithinSizeLimit) Locator_t LocatorBuffer; + // Set statistics properties manually to ensure a fixed size of participant properties + PropertyPolicy property_policy; + property_policy.properties().emplace_back( + eprosima::fastdds::dds::parameter_policy_physical_data_host, "test_host"); + property_policy.properties().emplace_back( + eprosima::fastdds::dds::parameter_policy_physical_data_user, "test_user"); + property_policy.properties().emplace_back( + eprosima::fastdds::dds::parameter_policy_physical_data_process, "test_process"); + PubSubWriter writer(TEST_TOPIC_NAME); LocatorList_t WriterUnicastLocators; @@ -559,7 +568,8 @@ TEST_P(PubSubBasic, ReceivedPropertiesDataWithinSizeLimit) writer.static_discovery("file://PubSubWriter.xml"). unicastLocatorList(WriterUnicastLocators).multicastLocatorList(WriterMulticastLocators). setPublisherIDs(1, - 2).setManualTopicName(std::string("BlackBox_StaticDiscovery_") + TOPIC_RANDOM_NUMBER).init(); + 2).setManualTopicName(std::string("BlackBox_StaticDiscovery_") + TOPIC_RANDOM_NUMBER) + .property_policy(property_policy).init(); ASSERT_TRUE(writer.isInitialized()); @@ -573,12 +583,29 @@ TEST_P(PubSubBasic, ReceivedPropertiesDataWithinSizeLimit) LocatorBuffer.port = static_cast(MULTICAST_PORT_RANDOM_NUMBER); ReaderMulticastLocators.push_back(LocatorBuffer); - //Expected properties have exactly size 92 - reader.properties_max_size(92). + // The calculation of the exact maximum properties size has been done according to the following table + // + // | Type | Value | Size | Alignment | Extra | Total | + // |-------|-------------------------------------|------|-----------|-------|-------| + // | key | PARTICIPANT_TYPE | 17 | 3 | 4 | 24 | + // | value | SIMPLE | 7 | 1 | 4 | 12 | + // | key | fastdds.physical_data.host | 27 | 1 | 4 | 32 | + // | value | test_host | 10 | 2 | 4 | 16 | + // | key | fastdds.physical_data.user | 27 | 1 | 4 | 32 | + // | value | test_user | 10 | 2 | 4 | 16 | + // | key | fastdds.physical_data.process | 30 | 2 | 4 | 36 | + // | value | test_process | 13 | 3 | 4 | 20 | + // | key | eProsimaEDPStatic_Writer_ALIVE_ID_1 | 36 | 0 | 4 | 40 | + // | value | 0.0.2.3 | 8 | 0 | 4 | 12 | + // + // Total: 240 Bytes + + reader.properties_max_size(240). static_discovery("file://PubSubReader.xml"). unicastLocatorList(ReaderUnicastLocators).multicastLocatorList(ReaderMulticastLocators). setSubscriberIDs(3, - 4).setManualTopicName(std::string("BlackBox_StaticDiscovery_") + TOPIC_RANDOM_NUMBER).init(); + 4).setManualTopicName(std::string("BlackBox_StaticDiscovery_") + TOPIC_RANDOM_NUMBER) + .property_policy(property_policy).init(); ASSERT_TRUE(reader.isInitialized());