Skip to content

Commit

Permalink
Refs #21808: Update UnsupportedData*Methods
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 9, 2024
1 parent 5bb5ffc commit 23914aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
13 changes: 1 addition & 12 deletions test/unittest/dds/publisher/DataWriterTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1733,9 +1733,7 @@ class DataWriterUnsupportedTests : public ::testing::Test
/*
* This test checks that the DataWriter methods defined in the standard not yet implemented in FastDDS return
* 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 @@ -1755,15 +1753,6 @@ TEST_F(DataWriterUnsupportedTests, UnsupportedDataWriterMethods)
DataWriter* data_writer = publisher->create_datawriter(topic, DATAWRITER_QOS_DEFAULT);
ASSERT_NE(publisher, nullptr);

SubscriptionBuiltinTopicData subscription_data;
fastdds::rtps::InstanceHandle_t subscription_handle;
EXPECT_EQ(
RETCODE_UNSUPPORTED,
data_writer->get_matched_subscription_data(subscription_data, subscription_handle));

std::vector<InstanceHandle_t> subscription_handles;
EXPECT_EQ(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
17 changes: 3 additions & 14 deletions test/unittest/dds/subscriber/DataReaderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2623,11 +2623,9 @@ class DataReaderUnsupportedTests : public ::testing::Test
/*
* This test checks that the DataReader methods defined in the standard not yet implemented in FastDDS return
* 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 @@ -2648,12 +2646,6 @@ TEST_F(DataReaderUnsupportedTests, UnsupportedDataReaderMethods)
DataReader* data_reader = subscriber->create_datareader(topic, DATAREADER_QOS_DEFAULT);
ASSERT_NE(data_reader, nullptr);

PublicationBuiltinTopicData publication_data;
InstanceHandle_t publication_handle;
EXPECT_EQ(
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 @@ -2670,9 +2662,6 @@ TEST_F(DataReaderUnsupportedTests, UnsupportedDataReaderMethods)
query_parameters));
}

std::vector<InstanceHandle_t> publication_handles;
EXPECT_EQ(RETCODE_UNSUPPORTED, data_reader->get_matched_publications(publication_handles));

InstanceHandle_t key_handle;
EXPECT_EQ(RETCODE_UNSUPPORTED, data_reader->get_key_value(nullptr, key_handle));

Expand Down

0 comments on commit 23914aa

Please sign in to comment.