Skip to content

Commit

Permalink
Refs #21711: Update unsupported api tests and fastrtps_deprecated api
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Dominguez <[email protected]>
  • Loading branch information
Mario-DL committed Oct 8, 2024
1 parent d03bda8 commit f969ca9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
2 changes: 1 addition & 1 deletion test/blackbox/api/fastrtps_deprecated/PubSubWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ class PubSubWriter
return *this;
}

PubSubWriter& userData(
PubSubWriter& user_data(
std::vector<eprosima::fastrtps::rtps::octet> user_data)
{
participant_attr_.rtps.userData = user_data;
Expand Down
13 changes: 1 addition & 12 deletions test/unittest/dds/publisher/DataWriterTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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<InstanceHandle_t> 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
Expand Down
18 changes: 3 additions & 15 deletions test/unittest/dds/subscriber/DataReaderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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;
Expand All @@ -2644,9 +2635,6 @@ TEST_F(DataReaderUnsupportedTests, UnsupportedDataReaderMethods)
query_parameters));
}

std::vector<InstanceHandle_t> 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));

Expand Down

0 comments on commit f969ca9

Please sign in to comment.