From ea2f1c3aa090a1a82ae4200bd7c5d438d8f188c2 Mon Sep 17 00:00:00 2001 From: Mario Dominguez Date: Wed, 2 Oct 2024 07:56:46 +0200 Subject: [PATCH] Refs #21711: Update unsupported api tests and fastrtps_deprecated api Signed-off-by: Mario Dominguez --- .../api/fastrtps_deprecated/PubSubWriter.hpp | 2 +- .../unittest/dds/publisher/DataWriterTests.cpp | 13 +------------ .../dds/subscriber/DataReaderTests.cpp | 18 +++--------------- 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/test/blackbox/api/fastrtps_deprecated/PubSubWriter.hpp b/test/blackbox/api/fastrtps_deprecated/PubSubWriter.hpp index ecad4d8fb73..c9693593c30 100644 --- a/test/blackbox/api/fastrtps_deprecated/PubSubWriter.hpp +++ b/test/blackbox/api/fastrtps_deprecated/PubSubWriter.hpp @@ -1174,7 +1174,7 @@ class PubSubWriter return *this; } - PubSubWriter& userData( + PubSubWriter& user_data( std::vector user_data) { participant_attr_.rtps.userData = user_data; diff --git a/test/unittest/dds/publisher/DataWriterTests.cpp b/test/unittest/dds/publisher/DataWriterTests.cpp index 529a46ca80d..e3f31473a0c 100644 --- a/test/unittest/dds/publisher/DataWriterTests.cpp +++ b/test/unittest/dds/publisher/DataWriterTests.cpp @@ -1755,9 +1755,7 @@ class DataWriterUnsupportedTests : public ::testing::Test /* * This test checks that the DataWriter methods defined in the standard not yet implemented in FastDDS return * ReturnCode_t::RETCODE_UNSUPPORTED. The following methods are checked: - * 1. get_matched_subscription_data - * 2. get_matched_subscriptions - * 3. lookup_instance + * 1. lookup_instance */ TEST_F(DataWriterUnsupportedTests, UnsupportedDataWriterMethods) { @@ -1777,15 +1775,6 @@ TEST_F(DataWriterUnsupportedTests, UnsupportedDataWriterMethods) DataWriter* data_writer = publisher->create_datawriter(topic, DATAWRITER_QOS_DEFAULT); ASSERT_NE(publisher, nullptr); - builtin::SubscriptionBuiltinTopicData subscription_data; - fastrtps::rtps::InstanceHandle_t subscription_handle; - EXPECT_EQ( - ReturnCode_t::RETCODE_UNSUPPORTED, - data_writer->get_matched_subscription_data(subscription_data, subscription_handle)); - - std::vector subscription_handles; - EXPECT_EQ(ReturnCode_t::RETCODE_UNSUPPORTED, data_writer->get_matched_subscriptions(subscription_handles)); - EXPECT_EQ(HANDLE_NIL, data_writer->lookup_instance(nullptr /* instance */)); // Expected logWarnings: lookup_instance diff --git a/test/unittest/dds/subscriber/DataReaderTests.cpp b/test/unittest/dds/subscriber/DataReaderTests.cpp index d06472baa73..341de233fd5 100644 --- a/test/unittest/dds/subscriber/DataReaderTests.cpp +++ b/test/unittest/dds/subscriber/DataReaderTests.cpp @@ -2597,11 +2597,9 @@ class DataReaderUnsupportedTests : public ::testing::Test /* * This test checks that the DataReader methods defined in the standard not yet implemented in FastDDS return * ReturnCode_t::RETCODE_UNSUPPORTED. The following methods are checked: - * 1. get_matched_publication_data - * 2. create_querycondition - * 3. get_matched_publications - * 4. get_key_value - * 5. wait_for_historical_data + * 1. create_querycondition + * 2. get_key_value + * 3. wait_for_historical_data */ TEST_F(DataReaderUnsupportedTests, UnsupportedDataReaderMethods) { @@ -2621,13 +2619,6 @@ TEST_F(DataReaderUnsupportedTests, UnsupportedDataReaderMethods) DataReader* data_reader = subscriber->create_datareader(topic, DATAREADER_QOS_DEFAULT); ASSERT_NE(data_reader, nullptr); - - builtin::PublicationBuiltinTopicData publication_data; - InstanceHandle_t publication_handle; - EXPECT_EQ( - ReturnCode_t::RETCODE_UNSUPPORTED, - data_reader->get_matched_publication_data(publication_data, publication_handle)); - { SampleStateMask sample_states = ANY_SAMPLE_STATE; ViewStateMask view_states = ANY_VIEW_STATE; @@ -2644,9 +2635,6 @@ TEST_F(DataReaderUnsupportedTests, UnsupportedDataReaderMethods) query_parameters)); } - std::vector publication_handles; - EXPECT_EQ(ReturnCode_t::RETCODE_UNSUPPORTED, data_reader->get_matched_publications(publication_handles)); - InstanceHandle_t key_handle; EXPECT_EQ(ReturnCode_t::RETCODE_UNSUPPORTED, data_reader->get_key_value(nullptr, key_handle));