Skip to content

Add a publish-and-take test for rmw_take_sequence#283

Open
xiao-yang25 wants to merge 1 commit into
ros2:rollingfrom
xiao-yang25:test/rmw-take-sequence
Open

Add a publish-and-take test for rmw_take_sequence#283
xiao-yang25 wants to merge 1 commit into
ros2:rollingfrom
xiao-yang25:test/rmw-take-sequence

Conversation

@xiao-yang25

Copy link
Copy Markdown

Summary

  • Expand the rmw_take_sequence test to publish and receive multiple messages.
  • Use BasicTypes sequence storage matching the subscription type instead of the previous Strings storage.
  • Publish three ordered messages and use a bounded wait-and-take loop to receive them.
  • Verify the number of messages taken, the message and metadata sequence sizes, and message ordering.
  • Retain the existing empty-subscription coverage.
  • Add scoped cleanup for the publisher, wait set, messages, and information sequences.

Testing

Tested commit: ba9916b

Environment:

  • Ubuntu 26.04 LTS
  • ARM64
  • ROS 2 Rolling
  • rmw_fastrtps_cpp

Commands:

colcon build --packages-up-to test_rmw_implementation

RMW_IMPLEMENTATION=rmw_fastrtps_cpp \
GTEST_FILTER=TestSubscriptionUse.take_sequence \
colcon test \
  --packages-select test_rmw_implementation \
  --ctest-args -R '^test_subscription__' --output-on-failure

colcon test-result --verbose

Result:

Summary: 2 tests, 0 errors, 0 failures, 0 skipped

Fixes #176

Signed-off-by: xiaoyang <xy1453417528@gmail.com>
@mergify

mergify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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.

Write a proper rmw_take_sequence test

1 participant