* Remove deprecated executor::FutureReturnCode APIs. (#1327)
While we are here, add in another test for the stream operator for future_return_code.cpp
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
* Revert removing deprecated API
Signed-off-by: Stephen Brawner <brawner@gmail.com>
Co-authored-by: Chris Lalancette <clalancette@openrobotics.org>
* Increase coverage of publisher/subscription API
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add coverage for missing API (except executors
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Do not check state
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Increase coverage of node_interfaces, including with mocking rcl errors
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add mocking utils for rclcpp
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add coverage for wait_set_policies
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Address PR feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Fix windows issues
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add test comment
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add tests getters msg type support
* Add missing fini
* Add tests type_support services
* Reformat to re use test structure
* Remove not needed headers
* Improve teardown test cases
* Add nullptr checks to type_support tests
* Reformat type_support testing
* Replace expect tests with asserts
* "Improve error msg for rcl_service_ini/fini fail"
* Improve test readability
Signed-off-by: Jorge Perez <jjperez@ekumenlabs.com>
Without this change, I am unable to build locally.
std_msgs is not declared as a test dependency or find_package'd anywhere, so
I'm not sure why CI ever passed the build phase.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>
* Increase timeouts for connext for long tests
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Fix cmakelists
Signed-off-by: Stephen Brawner <brawner@gmail.com>
It turns out rmw_connext_cpp adds a default waitable that other rmw
implementations do not. Adjusting the unit test to take this into
account in a non-rmw specific manner.
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* fix failing test with Connext since it doesn't wait for discovery
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
* Check for added service in the node graph
Signed-off-by: Stephen Brawner <brawner@gmail.com>
Co-authored-by: Stephen Brawner <brawner@gmail.com>
* fix node graph test with Connext and CycloneDDS returning actual data
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
* use ADD_FAILURE()
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
* Unit tests for memory_strategy classes (part 1)
Adds unit tests for:
* strategies/message_pool_memory_strategy.hpp
* memory_strategy.cpp
* message_memory_strategy.cpp
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Address PR Feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Update with new macros
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* EXPECT_THROW_EQ and ASSERT_THROW_EQ macros for unittests
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Address PR Feedback
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Parameterize test executors for all executor types (#1222)
* Relocate test_executor to executors directory
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Parametrize test_executors for all executor types
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* More fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Adding issue for tracking
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Remove tests for non-foxy API
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Derive and throw exception in spin_some spin_all for StaticSingleThreadedExecutor (#1220)
* Derive and throw exception in spin_some spin_all
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Fix style and add unit test
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Remove header changes and throw exceptions in .cpp
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Add unit test for static_executor_entities_collector
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Unit tests for allocator_memory_strategy.hpp
Part 1 of 2 for this file, but part 2 of 3 for memory strategies
overall
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* PR Fixup
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Remove find_package
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Remove ref to osrf_testing_tools
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Check period duration in create_wall_timer
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Adding comments
Signed-off-by: Stephen Brawner <brawner@gmail.com>
`this->node_options_` might still be `nullptr` for a default initialized NodeOptions instance.
`use_global_arguments()` must return `this->use_global_arguments_`, in analogy to `NodeOptions::enable_rosout()`.
Signed-off-by: Johannes Meyer <johannes@intermodalics.eu>
Co-authored-by: Johannes Meyer <johannes@intermodalics.eu>
* Fix conversion from negative Duration or Time to the respective message type and throw in Duration::to_rmw_time() if the duration is negative.
rmw_time_t cannot represent negative durations.
Constructors and assignment operators can be just defaulted.
Other changes are mainly cosmetical, to make conversions between signed
and unsigned types and between 32-bit and 64-bit types more explicit.
Signed-off-by: Johannes Meyer <johannes@intermodalics.eu>
* Add -Wconversion compiler option and fix implicit conversions that might alter the value
Signed-off-by: Johannes Meyer <johannes@intermodalics.eu>
* Fix usage of fixture class in some unit tests by using gtest macro TEST_F() instead of TEST().
Signed-off-by: Johannes Meyer <johannes@intermodalics.eu>
* Add compiler option -Wno-sign-conversion to fix build with Clang on macOS
Signed-off-by: Johannes Meyer <johannes@intermodalics.eu>
Co-authored-by: Johannes Meyer <johannes@intermodalics.eu>
* Log error instead of throwing exception in Transition and State reset(), mark no except (#1297)
* Catch potential exception in destructor and log
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Remove thrown error from reset and mark it no except
Signed-off-by: Stephen Brawner <brawner@gmail.com>
* Remove noexcept for ABI compatibility
Signed-off-by: Stephen Brawner <brawner@gmail.com>
If the user doesn't retain a reference to the returned shared pointer there will be zero references and their callback will be unregistered.
Signed-off-by: Jacob Perron <jacob@openrobotics.org>