From 598f64ca6e33a7888ad096fae54d544cf5735fcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez=20Moreno?= Date: Thu, 4 Apr 2024 15:28:34 +0200 Subject: [PATCH] Refs #20734: Fix some tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ricardo González Moreno --- .../builtin/typelookup/TypeLookupManager.i | 19 -------- .../typelookup/TypeLookupReplyListener.i | 19 -------- .../typelookup/TypeLookupRequestListener.i | 19 -------- .../typelookup/common/TypeLookupTypes.i | 47 ------------------- .../src/swig/fastdds/dds/topic/TypeSupport.i | 10 ++-- fastdds_python/test/api/test_qos.py | 12 ----- 6 files changed, 5 insertions(+), 121 deletions(-) delete mode 100644 fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupManager.i delete mode 100644 fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupReplyListener.i delete mode 100644 fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupRequestListener.i delete mode 100644 fastdds_python/src/swig/fastdds/dds/builtin/typelookup/common/TypeLookupTypes.i diff --git a/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupManager.i b/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupManager.i deleted file mode 100644 index dc37b25e..00000000 --- a/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupManager.i +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -%{ -#include "fastdds/dds/builtin/typelookup/TypeLookupManager.hpp" -%} - -%include "fastdds/dds/builtin/typelookup/TypeLookupManager.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupReplyListener.i b/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupReplyListener.i deleted file mode 100644 index 8b419377..00000000 --- a/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupReplyListener.i +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -%{ -#include "fastdds/dds/builtin/typelookup/TypeLookupReplyListener.hpp" -%} - -%include "fastdds/dds/builtin/typelookup/TypeLookupReplyListener.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupRequestListener.i b/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupRequestListener.i deleted file mode 100644 index 60e2a2d3..00000000 --- a/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/TypeLookupRequestListener.i +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -%{ -#include "fastdds/dds/builtin/typelookup/TypeLookupRequestListener.hpp" -%} - -%include "fastdds/dds/builtin/typelookup/TypeLookupRequestListener.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/common/TypeLookupTypes.i b/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/common/TypeLookupTypes.i deleted file mode 100644 index 14ebf795..00000000 --- a/fastdds_python/src/swig/fastdds/dds/builtin/typelookup/common/TypeLookupTypes.i +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -%{ -#include "fastdds/dds/builtin/typelookup/common/TypeLookupTypes.hpp" -%} - -// Avoid creating the default constructor for abstract types -%nodefaultctor eprosima::fastdds::dds::builtin::TypeLookup_RequestPubSubType; // Pure virtual -%ignore eprosima::fastdds::dds::builtin::TypeLookup_RequestPubSubType::TypeLookup_RequestPubSubType; - -%nodefaultctor eprosima::fastdds::dds::builtin::TypeLookup_ReplyPubSubType; // Pure virtual -%ignore eprosima::fastdds::dds::builtin::TypeLookup_ReplyPubSubType::TypeLookup_ReplyPubSubType; - -// Ignore overloaded methods that have no application on Python -// Otherwise they will issue a warning -%ignore eprosima::fastdds::dds::builtin::TypeLookup_getTypes_Result::TypeLookup_getTypes_Result(TypeLookup_getTypes_Result&&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_getTypes_Result::result(TypeLookup_getTypes_Out &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_getTypes_Result::_d() const; - -%ignore eprosima::fastdds::dds::builtin::TypeLookup_getTypeDependencies_Result::TypeLookup_getTypeDependencies_Result(TypeLookup_getTypeDependencies_Result &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_getTypeDependencies_Result::result(TypeLookup_getTypeDependencies_Out &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_getTypeDependencies_Result::_d() const; - -%ignore eprosima::fastdds::dds::builtin::TypeLookup_Call::TypeLookup_Call(TypeLookup_Call &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_Call::result(TypeLookup_getTypeDependencies_Out &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_Call::getTypes(TypeLookup_getTypes_In &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_Call::getTypeDependencies(TypeLookup_getTypeDependencies_In &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_Call::_d() const; - -%ignore eprosima::fastdds::dds::builtin::TypeLookup_Return::TypeLookup_Return(TypeLookup_Return &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_Return::getType(TypeLookup_getTypes_Result &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_Return::getTypeDependencies(TypeLookup_getTypeDependencies_Result &&); -%ignore eprosima::fastdds::dds::builtin::TypeLookup_Return::_d() const; - -%include "fastdds/dds/builtin/typelookup/common/TypeLookupTypes.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/topic/TypeSupport.i b/fastdds_python/src/swig/fastdds/dds/topic/TypeSupport.i index cba73e97..4ad811dd 100644 --- a/fastdds_python/src/swig/fastdds/dds/topic/TypeSupport.i +++ b/fastdds_python/src/swig/fastdds/dds/topic/TypeSupport.i @@ -27,7 +27,7 @@ // This constructor takes ownership of the TopicDataType pointer // We need SWIG to be aware of it, so we ignore it here and redefine it later -%ignore eprosima::fastdds::dds::TypeSupport::TypeSupport(fastdds::dds::TopicDataType*); +%ignore eprosima::fastdds::dds::TypeSupport::TypeSupport(TopicDataType*); %ignore eprosima::fastdds::dds::TypeSupport::TypeSupport(DynamicPubSubType); @@ -37,14 +37,14 @@ // Do not worry about the heap allocation, SWIG recognizes the method as a constructor // and successfully deallocates on destruction %extend eprosima::fastdds::dds::TypeSupport { - %apply SWIGTYPE *DISOWN { eprosima::fastdds::dds::TopicDataType* ptr }; - TypeSupport(eprosima::fastdds::dds::TopicDataType* ptr) + %apply SWIGTYPE *DISOWN { TopicDataType* ptr }; + TypeSupport(TopicDataType* ptr) { return new eprosima::fastdds::dds::TypeSupport(ptr); } - %apply SWIGTYPE *DISOWN { eprosima::fastdds::dds::TopicDataType* ptr }; - void set(eprosima::fastdds::dds::TopicDataType* ptr) + %apply SWIGTYPE *DISOWN { TopicDataType* ptr }; + void set(TopicDataType* ptr) { self->reset(ptr); } diff --git a/fastdds_python/test/api/test_qos.py b/fastdds_python/test/api/test_qos.py index fe9e284c..6d4d6fc1 100644 --- a/fastdds_python/test/api/test_qos.py +++ b/fastdds_python/test/api/test_qos.py @@ -1505,13 +1505,6 @@ def test_domain_participant_qos(): assert(fastdds.LOCATOR_KIND_UDPv4 == locator.kind) assert(fastdds.FILTER_DIFFERENT_HOST == participant_qos. wire_protocol().builtin.discovery_config.ignoreParticipantFlags) - # ## .typelookup_config; - participant_qos.wire_protocol().builtin.typelookup_config.use_client = True - participant_qos.wire_protocol().builtin.typelookup_config.use_server = True - assert(participant_qos.wire_protocol().builtin. - typelookup_config.use_client) - assert(participant_qos.wire_protocol().builtin. - typelookup_config.use_server) # ## .metatrafficUnicastLocatorList; locator = fastdds.Locator_t() locator.address = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 168, 1, 2) @@ -1761,11 +1754,6 @@ def test_domain_participant_qos(): assert(fastdds.LOCATOR_KIND_UDPv4 == locator.kind) assert(fastdds.FILTER_DIFFERENT_HOST == default_participant_qos. wire_protocol().builtin.discovery_config.ignoreParticipantFlags) - # ## .typelookup_config; - assert(default_participant_qos.wire_protocol().builtin. - typelookup_config.use_client) - assert(default_participant_qos.wire_protocol().builtin. - typelookup_config.use_server) # ## .metatrafficUnicastLocatorList; locator = default_participant_qos.wire_protocol().builtin. \ metatrafficUnicastLocatorList[0]