From b5481185b4c76e0a6a171fbee5184de396daa775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez=20Moreno?= Date: Tue, 24 Sep 2024 11:20:14 +0200 Subject: [PATCH] Refs #20165. Apply suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ricardo González Moreno --- .../builtin/type_lookup_service/TypeLookupReplyListener.cpp | 1 + .../xtypes/type_lookup_service/TypeLookupServiceTests.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupReplyListener.cpp b/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupReplyListener.cpp index 00e6405a053..98270635c1e 100644 --- a/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupReplyListener.cpp +++ b/src/cpp/fastdds/builtin/type_lookup_service/TypeLookupReplyListener.cpp @@ -218,6 +218,7 @@ void TypeLookupReplyListener::check_get_types_reply( } else { + typelookup_manager_->notify_callbacks(RETCODE_NO_DATA, type_id); EPROSIMA_LOG_WARNING(TYPELOOKUP_SERVICE_REPLY_LISTENER, "Received reply with no types."); register_result = RETCODE_ERROR; diff --git a/test/unittest/dds/xtypes/type_lookup_service/TypeLookupServiceTests.cpp b/test/unittest/dds/xtypes/type_lookup_service/TypeLookupServiceTests.cpp index acce49daf0c..7defb76b026 100644 --- a/test/unittest/dds/xtypes/type_lookup_service/TypeLookupServiceTests.cpp +++ b/test/unittest/dds/xtypes/type_lookup_service/TypeLookupServiceTests.cpp @@ -618,6 +618,7 @@ TEST_F(TypeLookupServiceTests, TypeLookupReplyListener_wrong_replyid) tlm_->async_get_type_requests_.emplace(valid_sampleidentity(), tidws); TypeLookup_Reply reply; + reply.header().relatedRequestId(valid_sampleidentity()); reply.return_value()._default(); ReplyWithServerGUID reply_with_guid; reply_with_guid.reply = reply; @@ -632,7 +633,7 @@ TEST_F(TypeLookupServiceTests, TypeLookupReplyListener_wrong_replyid) TEST_F(TypeLookupServiceTests, TypeLookupReplyListener_getTypes_empty) { MockLogConsumer* log_consumer = - setup_expect_log_msg("TYPELOOKUP_SERVICE_REPLY_LISTENER", "Reply no contains any type."); + setup_expect_log_msg("TYPELOOKUP_SERVICE_REPLY_LISTENER", "Received reply with no types."); TypeIdentfierWithSize tidws; tlm_->async_get_type_requests_.emplace(valid_sampleidentity(), tidws); @@ -852,7 +853,7 @@ TEST_F(TypeLookupServiceTests, TypeLookupRequestListener_getTypes_empty) { MockLogConsumer* log_consumer = setup_expect_log_msg("TYPELOOKUP_SERVICE_REQUEST_LISTENER", - "Request no contains any type identifier."); + "Received request with no type identifiers."); TypeIdentfierWithSize tidws; tlm_->async_get_type_requests_.emplace(valid_sampleidentity(), tidws);