From a4dada1580df2366047d77fa6ad8e1138b8a5b06 Mon Sep 17 00:00:00 2001 From: Michael <4115205+MelamudMichael@users.noreply.github.com> Date: Wed, 13 Mar 2024 10:35:44 -0400 Subject: [PATCH] Adding support for full build (#20) various fixes and improvements to the build system --- .github/workflows/ci.yml | 10 +-- CMakeLists.txt | 7 +- README.md | 12 ++-- conanfile.py | 29 +++++---- conaninfo/conanfile.txt | 11 ---- lib/CMakeLists.txt | 43 ++++++------ .../message/messageBuilder.h | 4 +- .../message/messageCommon.h | 4 +- .../message/messageParser.h | 4 +- .../up-client-zenoh-cpp/rpc/zenohRpcClient.h | 4 +- .../session/zenohSessionManager.h | 4 +- .../transport/zenohUTransport.h | 4 +- lib/src/messageBuilder.cpp | 4 +- lib/src/messageParser.cpp | 4 +- lib/src/zenohRpcClient.cpp | 14 ++-- lib/src/zenohSessionManager.cpp | 4 +- lib/src/zenohUTransport.cpp | 7 +- test/CMakeLists.txt | 43 ++++++++++++ test/src/main_test.cpp | 65 +++++++++++++++++++ 19 files changed, 188 insertions(+), 89 deletions(-) delete mode 100644 conaninfo/conanfile.txt create mode 100644 test/CMakeLists.txt create mode 100644 test/src/main_test.cpp diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58d110f..da5a64b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,6 @@ jobs: run: | git clone https://github.com/eclipse-uprotocol/up-cpp.git cd up-cpp - git clone -b uprotocol-core-api-1.5.6 https://github.com/eclipse-uprotocol/up-core-api.git git submodule update --init --recursive conan create . --build=missing @@ -50,9 +49,10 @@ jobs: - name: Build && install up-client-zenoh-cpp shell: bash run: | - conan install conaninfo/ --output-folder=. - cd build/Release - cmake ../../ -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local + mkdir build + cd build + conan install ../ -o build_unbundled=True -o zenoh_package=False + cmake ../ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local cmake --build . --target install --config Release -- -j @@ -69,4 +69,4 @@ jobs: if: always() steps: - name: Check whether all jobs pass - run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' \ No newline at end of file + run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e773e4..2cfad17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023 General Motors GTO LLC +# Copyright (c) 2024 General Motors GTO LLC # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -36,6 +36,7 @@ endif() add_subdirectory(lib) -if(BUILD_SAMPLES) - add_subdirectory(samples) +if(BUILD_TESTING) + enable_testing() + add_subdirectory(test) endif() \ No newline at end of file diff --git a/README.md b/README.md index 03bf2b4..0f6289e 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,9 @@ This module contains the implementation for pub-sub and RPC API`s defined in the $ git clone https://github.com/eclipse-uprotocol/up-client-zenoh-cpp.git ``` ## How to Use the Library -To add up-cpp to your conan build dependencies, simply add the following to your conanfile.txt: +To add up-client-zenoh-cpp to your conan build dependencies, simply add the following to your conanfile.txt: ``` [requires] -up-cpp/0.1 up-cpp-client-zenoh/0.1 protobuf/3.21.12 @@ -43,10 +42,11 @@ cmake_layout ### Building locally ``` $ cd up-cpp-client-zenoh -$ conan install conaninfo/ --output-folder=. -$ cd build/Release -$ cmake ../../ -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -$ make -j +$ mkdir build +$ cd build +$ conan install ../ +$ cmake ../ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release +$ cmake --build . --config Release -- -j ``` #### Creating conan package locally diff --git a/conanfile.py b/conanfile.py index 4846ebd..b416cce 100644 --- a/conanfile.py +++ b/conanfile.py @@ -16,14 +16,15 @@ class UpClientZenoh(ConanFile): options = {"shared": [True, False], "fPIC": [True, False]} conan_version = None generators = "CMakeDeps" - version = "0.1" - exports_sources = "CMakeLists.txt", "lib/*" + version = "0.1.2-dev" + exports_sources = "CMakeLists.txt", "lib/*", "test/*" options = { "shared": [True, False], "fPIC": [True, False], "build_testing": [True, False], "build_unbundled": [True, False], + "zenoh_package": [True, False], "build_cross_compiling": [True, False], } @@ -31,25 +32,24 @@ class UpClientZenoh(ConanFile): "shared": False, "fPIC": False, "build_testing": False, - "build_unbundled": False, + "build_unbundled": True, + "zenoh_package": False, "build_cross_compiling": False, } - # def configure(self): - # self.options["up-cpp"].shared = True - def requirements(self): - if self.options.build_unbundled: - self.requires("up-cpp/0.1.5.0-dev") - self.requires("zenohc/cci.20240213") - self.requires("protobuf/3.21.12" + ("@cross/cross" if self.options.build_cross_compiling else "")) - else: - self.requires("up-cpp/0.1") - self.requires("spdlog/1.13.0") - self.requires("protobuf/3.21.12") + self.requires("protobuf/3.21.12" + ("@cross/cross" if self.options.build_cross_compiling else "")) + self.requires("spdlog/1.13.0") + if self.options.build_testing: + self.requires("gtest/1.14.0") + if self.options.build_unbundled: #each componenet is built independently + self.requires("up-cpp/0.1.1-dev") + if self.options.zenoh_package: + self.requires("zenohc/cci.20240213") def generate(self): tc = CMakeToolchain(self) + tc.variables["BUILD_TESTING"] = self.options.build_testing tc.generate() def build(self): @@ -63,3 +63,4 @@ def package(self): def package_info(self): self.cpp_info.libs = ["up-client-zenoh-cpp"] + diff --git a/conaninfo/conanfile.txt b/conaninfo/conanfile.txt deleted file mode 100644 index d4f5ad4..0000000 --- a/conaninfo/conanfile.txt +++ /dev/null @@ -1,11 +0,0 @@ -[requires] -up-cpp/0.1 -protobuf/3.21.12 -spdlog/1.13.0 - -[generators] -CMakeDeps -CMakeToolchain - -[layout] -cmake_layout \ No newline at end of file diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 954cb4f..ecfa286 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023 General Motors GTO LLC +# Copyright (c) 2024 General Motors GTO LLC # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -19,14 +19,15 @@ cmake_minimum_required(VERSION 3.20) project(up-client-zenoh-cpp VERSION 0.1.0 LANGUAGES CXX) +find_package(Protobuf REQUIRED) +find_package(spdlog REQUIRED) + if(BUILD_UNBUNDLED) find_package(up-cpp REQUIRED) find_package(zenohc REQUIRED) else() find_library(ZENOH_LIB zenohc) - find_package(up-cpp REQUIRED) - find_package(Protobuf REQUIRED) - find_package(spdlog REQUIRED) + find_package(up-cpp QUIET) endif() # Support pulling headers outside of /usr/local @@ -39,32 +40,30 @@ set(SRC_FILES src/zenohRpcClient.cpp src/zenohSessionManager.cpp src/messageBuilder.cpp - src/messageParser.cpp - ) + src/messageParser.cpp) add_library(${PROJECT_NAME} ${SRC_FILES}) add_library(up-client-zenoh-cpp::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) +target_include_directories(${PROJECT_NAME} + PUBLIC + $ + $ + $ENV{CMAKE_ZENOH_INCLUDE_PATH} + ${HOME}/include + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/src) + if(BUILD_UNBUNDLED) - target_include_directories(${PROJECT_NAME} - PUBLIC - $ - $ - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/src - ) target_link_libraries(${PROJECT_NAME} - PRIVATE + PUBLIC up-cpp::up-cpp - zenohc::lib - ) + zenohc::lib) else() - target_include_directories(${PROJECT_NAME} - PRIVATE - ${up-cpp_INCLUDE_DIR} - include - ) - target_link_libraries(${PROJECT_NAME} PRIVATE up-cpp::up-cpp ${ZENOH_LIB}) + target_link_libraries(${PROJECT_NAME} + PUBLIC + up-cpp::up-cpp + ${ZENOH_LIB}) endif() INSTALL(TARGETS ${PROJECT_NAME}) diff --git a/lib/include/up-client-zenoh-cpp/message/messageBuilder.h b/lib/include/up-client-zenoh-cpp/message/messageBuilder.h index f4f3366..b10a851 100644 --- a/lib/include/up-client-zenoh-cpp/message/messageBuilder.h +++ b/lib/include/up-client-zenoh-cpp/message/messageBuilder.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/message/messageCommon.h b/lib/include/up-client-zenoh-cpp/message/messageCommon.h index 07bb2bc..f5592d4 100644 --- a/lib/include/up-client-zenoh-cpp/message/messageCommon.h +++ b/lib/include/up-client-zenoh-cpp/message/messageCommon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/message/messageParser.h b/lib/include/up-client-zenoh-cpp/message/messageParser.h index 25517fe..f7f0e59 100644 --- a/lib/include/up-client-zenoh-cpp/message/messageParser.h +++ b/lib/include/up-client-zenoh-cpp/message/messageParser.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/rpc/zenohRpcClient.h b/lib/include/up-client-zenoh-cpp/rpc/zenohRpcClient.h index 8bbe009..ae88193 100644 --- a/lib/include/up-client-zenoh-cpp/rpc/zenohRpcClient.h +++ b/lib/include/up-client-zenoh-cpp/rpc/zenohRpcClient.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/session/zenohSessionManager.h b/lib/include/up-client-zenoh-cpp/session/zenohSessionManager.h index 71fc5a8..d3b0890 100644 --- a/lib/include/up-client-zenoh-cpp/session/zenohSessionManager.h +++ b/lib/include/up-client-zenoh-cpp/session/zenohSessionManager.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/include/up-client-zenoh-cpp/transport/zenohUTransport.h b/lib/include/up-client-zenoh-cpp/transport/zenohUTransport.h index 700dc94..1151612 100644 --- a/lib/include/up-client-zenoh-cpp/transport/zenohUTransport.h +++ b/lib/include/up-client-zenoh-cpp/transport/zenohUTransport.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/src/messageBuilder.cpp b/lib/src/messageBuilder.cpp index 25eb92c..70c9402 100644 --- a/lib/src/messageBuilder.cpp +++ b/lib/src/messageBuilder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/src/messageParser.cpp b/lib/src/messageParser.cpp index e466cba..588b80c 100644 --- a/lib/src/messageParser.cpp +++ b/lib/src/messageParser.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/src/zenohRpcClient.cpp b/lib/src/zenohRpcClient.cpp index 82bb18b..cc3630c 100644 --- a/lib/src/zenohRpcClient.cpp +++ b/lib/src/zenohRpcClient.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ @@ -119,17 +119,17 @@ std::future ZenohRpcClient::invokeMethod(const UUri &uri, if (0 == refCount_) { spdlog::error("ZenohRpcClient is not initialized"); - return std::move(future); + return future; } if (false == isRPCMethod(uri.resource())) { spdlog::error("URI is not of RPC type"); - return std::move(future); + return future; } if (UMessageType::REQUEST != attributes.type()) { spdlog::error("Wrong message type = {}", UMessageTypeToString(attributes.type()).value()); - return std::move(future); + return future; } auto uriHash = std::hash{}(LongUriSerializer::serialize(uri)); @@ -137,7 +137,7 @@ std::future ZenohRpcClient::invokeMethod(const UUri &uri, auto header = MessageBuilder::buildHeader(attributes); if (header.empty()) { spdlog::error("Failed to build header"); - return std::move(future); + return future; } z_bytes_t bytes; @@ -167,7 +167,7 @@ std::future ZenohRpcClient::invokeMethod(const UUri &uri, if (0 != z_get(z_loan(session_), z_keyexpr(std::to_string(uriHash).c_str()), "", z_move(channel->send), &opts)) { spdlog::error("z_get failure"); z_drop(&map); - return std::move(future); + return future; } future = threadPool_->submit(handleReply, channel); diff --git a/lib/src/zenohSessionManager.cpp b/lib/src/zenohSessionManager.cpp index 05b63ea..bb954ed 100644 --- a/lib/src/zenohSessionManager.cpp +++ b/lib/src/zenohSessionManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ diff --git a/lib/src/zenohUTransport.cpp b/lib/src/zenohUTransport.cpp index bfdae58..98ba2ce 100644 --- a/lib/src/zenohUTransport.cpp +++ b/lib/src/zenohUTransport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 General Motors GTO LLC + * Copyright (c) 2024 General Motors GTO LLC * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -18,7 +18,7 @@ * specific language governing permissions and limitations * under the License. * SPDX-FileType: SOURCE - * SPDX-FileCopyrightText: 2023 General Motors GTO LLC + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC * SPDX-License-Identifier: Apache-2.0 */ @@ -93,7 +93,7 @@ UStatus ZenohUTransport::term() noexcept { if (0 == refCount_) { - uint8_t retries; + uint8_t retries = 0; termPending_ = true; @@ -277,6 +277,7 @@ UCode ZenohUTransport::sendPublish(const UUri &uri, UCode ZenohUTransport::sendQueryable(const UUri &uri, const UPayload &payload, const UAttributes &attributes) noexcept { + if (UMessageType::RESPONSE != attributes.type()) { spdlog::error("Wrong message type = {}", UMessageTypeToString(attributes.type()).value()); return UCode::INVALID_ARGUMENT; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..d8b32f1 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,43 @@ +# Copyright (c) 2024 General Motors GTO LLC +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +# +# SPDX-FileType: SOURCE +# SPDX-FileCopyrightText: 2024 General Motors GTO LLC +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.20) +project(test VERSION 0.1.0 LANGUAGES CXX) + +find_package(GTest REQUIRED) +find_package(spdlog REQUIRED) + +# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) +add_executable(main_test + src/main_test.cpp) +target_link_libraries(main_test + PUBLIC + up-client-zenoh-cpp::up-client-zenoh-cpp + spdlog::spdlog + PRIVATE + GTest::gtest_main + GTest::gmock + pthread +) + +add_test("t-18-main_test" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/main_test) diff --git a/test/src/main_test.cpp b/test/src/main_test.cpp new file mode 100644 index 0000000..5bc8d11 --- /dev/null +++ b/test/src/main_test.cpp @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2024 General Motors GTO LLC + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + * SPDX-FileType: SOURCE + * SPDX-FileCopyrightText: 2024 General Motors GTO LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include + +using namespace uprotocol::utransport; + +class upClientZenohCppTest : public ::testing::Test { + + public: + + public: + // SetUpTestSuite() is called before all tests in the test suite + static void SetUpTestSuite() { + + if (UCode::OK != ZenohUTransport::instance().init().code()) { + spdlog::error("ZenohUTransport::instance().init failed"); + return; + } + } + + // TearDownTestSuite() is called after all tests in the test suite + static void TearDownTestSuite() { + + if (UCode::OK != ZenohUTransport::instance().term().code()) { + spdlog::error("ZenohUTransport::instance().term() failed"); + return; + } + } +}; + +/* Deprecate non existing topic */ +TEST_F(upClientZenohCppTest, DummyTest) { + +} + +//unsubscribe from non existane topic +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file