test(agnocastlib): add CIE integration tests for dynamic callback groups#1264
Draft
atsushi421 wants to merge 1 commit intomainfrom
Draft
test(agnocastlib): add CIE integration tests for dynamic callback groups#1264atsushi421 wants to merge 1 commit intomainfrom
atsushi421 wants to merge 1 commit intomainfrom
Conversation
Add integration tests for CallbackIsolatedAgnocastExecutor that verify the monitoring loop correctly handles callback groups created after spin() has started: - test_ros2_callback_group_added_after_spin: creates a ROS callback group with a timer after spin, verifies the monitoring loop detects it, spawns a child executor, publishes CallbackGroupInfo, and the timer callback executes. - test_agnocast_callback_group_added_after_spin: creates an agnocast callback group with an agnocast subscription after spin, verifies the monitoring loop detects it, spawns a SingleThreadedAgnocastExecutor, publishes CallbackGroupInfo, and the agnocast callback executes via mqueue. Also includes the existing test_spin_publishes_callback_group_info test that was previously only in the tier4/agnocast fork. Signed-off-by: atsushi421 <atsushi.yano.2@tier4.jp>
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
Add integration tests for
CallbackIsolatedAgnocastExecutorthat verify the monitoring loop correctly handles callback groups created afterspin()has started:CallbackGroupInfofor all callback groups present at spin time.spin(), verifies the monitoring loop detects it, spawns a child executor, publishesCallbackGroupInfo, and the timer callback executes.spin(), verifies the monitoring loop detects it, spawns aSingleThreadedAgnocastExecutor, publishesCallbackGroupInfo, and the agnocast callback executes via mqueue.Related links
How was this PR tested?
bash scripts/test/e2e_test_1to1.bash(required)bash scripts/test/e2e_test_2to2.bash(required)bash scripts/test/run_requires_kernel_module_tests.bash(required)All 38 integration tests pass locally (including the 3 new CIE tests):
Notes for reviewers
These tests use the existing ioctl mock (
test/integration/src/ioctl_mock.cpp) so they do not require the kernel module to run.An important implementation note: callback groups created dynamically must be stored as member variables (SharedPtr) because
NodeBase::callback_groups_holdsWeakPtr. If the callback group's only strong reference goes out of scope, the group is destroyed and the monitoring loop cannot detect it.Version Update Label (Required)
need-patch-update— test-only addition, no production code changes.