Repository navigation
test(rclcpp_lifecycle): add unit tests for LifecycleNode::create_generic_publisher - #3396
Open
Aaravanand00 wants to merge 1 commit into
Open
Aaravanand00 wants to merge 1 commit into
Aaravanand00 wants to merge 1 commit into
Conversation
…ric_publisher Signed-off-by: Aaravanand <aaravanand@gmail.com>
Contributor
Author
|
Hi @fujitatomoya @clalancette While reviewing the recent addition of This pr fills that gap by adding unit tests covering successful initialization, topic name validation, invalid typesupport error handling, custom publisher options, and message publishing. This improves test coverage for |
ABI Compliance Check✅ Verdict: compatible
✅
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds unit test coverage for
LifecycleNode::create_generic_publisherinrclcpp_lifecycle.While
create_generic_subscriptionwas recently introduced alongsidetest_lifecycle_generic_subscription.cpp,LifecycleNode::create_generic_publisherlacked dedicated unit tests. This PR introducesrclcpp_lifecycle/test/test_lifecycle_generic_publisher.cppand registers it inrclcpp_lifecycle/CMakeLists.txt.The new test suite covers :-
creation_and_destruction: Creation with valid topic name, typesupport string (test_msgs/msg/Strings), and QoS; verifies topic name accessor.invalid_topic_name: Verifies that passing an invalid topic name throwsrclcpp::exceptions::InvalidTopicNameError.invalid_topic_type: Verifies that passing an invalid/unregistered typesupport string throws astd::runtime_error.custom_publisher_options: Verifies passing customrclcpp::PublisherOptionswith an explicit callback group.publish_serialized_message: Verifies publishing arclcpp::SerializedMessagevia the generic publisher without throwing.Is this user-facing behavior change?
Did you use Generative AI?
Yes I was used to assist with structuring and writing the unit test cases and CMake registration.
Additional Information
ament_cpplint(0 problems found).ament_uncrustify(0 code style divergence).