Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and split test_service into test_{service,client} #144

Merged

Conversation

christophebedard
Copy link
Member

@christophebedard christophebedard commented Nov 10, 2024

The service/client instrumentation isn't currently complete (see #143), so the test_service tracing test wasn't really maintained. To be more in line with other tests:

  1. Modify the test_service_ping and test_service_pong test nodes to have only 1 client in the test_sevice_ping node and only 1 service in the test_service_pong node. The goal is simply to get a ping->pong communication and then shut down. Therefore, unlike pubs/subs, we only need 1 pair of client/service: we can simply do a request->response. Also, simplify the code a bit.
  2. Change test_service.py to only assert service-related events; nothing client-related. This is more in line with test_publisher.py/test_subscription.py.
  3. Add test_client.py and only assert client-related events; nothing service-related. This means that the test is quite simple.

Requires ros2/rclcpp#2670 to fix a missing tracepoint trigger.


action-ros-ci-repos-override: https://gist.githubusercontent.com/christophebedard/49dc900164d67c8bc994a9104e7fd0b1/raw/fb5b5ef110c38880fd5ce71a21102e0776343058/ros2.repos

@christophebedard christophebedard force-pushed the christophebedard/revamp-service-test-add-client-test branch from e52c955 to 72d9cfb Compare November 10, 2024 18:33
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me with green CI.

@christophebedard
Copy link
Member Author

Pulls: #144, ros2/rclcpp#2670
Gist: https://gist.githubusercontent.com/christophebedard/b3572b9fa2f4051bb29d608e9ea6d45a/raw/7344d55e9c011cd93cf654afa10ea4e7c889938c/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp test_tracetools
TEST args: --packages-above rclcpp test_tracetools
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/14807

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

Copy link
Contributor

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with green CI

@christophebedard christophebedard merged commit f1e79eb into rolling Nov 11, 2024
8 of 9 checks passed
@christophebedard christophebedard deleted the christophebedard/revamp-service-test-add-client-test branch November 11, 2024 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants