Repository navigation
Expect event callbacks only for handlers that were created (backport #3461) - #3465
Merged
Merged
Conversation
disable_enable_event_callbacks and its generic pubsub twin expect the deadline and liveliness callbacks to run. rclcpp creates no handler for an event type the RMW doesn't support (it only warns), so on such an RMW the count stays at 0 and the test fails although enabling and disabling work. Derive the expected counts from the handlers that exist and skip only when there are none. This drops the rmw_zenoh skip in test_generic_pubsub as well: test_subscription runs the same body on rmw_zenoh_cpp without a skip and passes. Claude-Session: https://claude.ai/code/session_012EJmdSvyUzRoZmYQKqLnjQ Signed-off-by: Abderahmane Benali <46283596+benaliabderrahmane@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 06702a1)
Contributor
|
Pulls: #3465 |
ABI Compliance Check✅ Verdict: compatible
✅
|
ahcorde
approved these changes
Dec 2, 2026
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
disable_enable_event_callbacks (test_subscription) and disable_enable_subscription_event_callbacks (test_generic_pubsub), added in #2985, expect deadline and liveliness callbacks to run. rclcpp creates no handler for an event type the RMW doesn't support (bind_event_callbacks catches it and warns), so on such an RMW the count stays 0 and the test fails although enable/disable works. Expected counts now come from the handlers that exist; skip only if neither exists. This also drops the rmw_zenoh skip in test_generic_pubsub, since test_subscription runs the same body on Zenoh without one and passes.
The tests was added because I'm trying to make a new rmw (rmw_unix_socket_cpp) that doesn't support deadline pass the nightly tests, without adding a new if along the zenoh condition
Is this user-facing behavior change?
No (test only).
Did you use Generative AI?
Yes, Claude Code and I reviewed and tested it
.
Additional Information
Both tests pass with the change on Fast DDS, Cyclone DDS, rmw_zenoh_cpp (the generic one now runs instead of skipping) and rmw_unix_socket_cpp (0 deadline, 1 liveliness callback), tested on Lyrical (rclcpp 32.0.3, same test bodies as rolling).
Why not rmw_event_type_is_supported: rmw_zenoh answers "unsupported" but still creates the handlers, so its callbacks do run.
This is an automatic backport of pull request #3461 done by Mergify.