Adjust for new rclcpp::Rate API#516
Merged
clalancette merged 1 commit intoros2:rollingfrom Aug 31, 2023
Merged
Conversation
7 tasks
Signed-off-by: Alexey Merzlyakov <alexey.merzlyakov@samsung.com>
3583a4a to
59b6238
Compare
clalancette
approved these changes
Aug 31, 2023
Contributor
|
CI for this is in ros2/rclcpp#2123 (comment) |
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.
This is a adjustement fix for the test regressions appeared in
test_communicationandtest_securityafter applying newrclcpp::RateAPI (ros2/rclcpp#2123).The new
rclcpp::RateAPI after the change implies that RCLCPP context should exist at therate.sleep()call time. However, internal test publisher's logic does not destroy theRateobjects after RCLCPP was stopped, which causes a runtime exceptions. Moreover, there are some tests (named**AfterShutdown), that intentionally runs the subscriber and publisher nodes (withrclcpp::Rateworking inside) after the context was stopped and checks that everything is just closed correctly. This in our case is also causing the same run-time exception.Thus, without large test modification, it is seems to be impossible to fix it by just changing the
rclcpp::Rateusage logic. Therefore, it was chosen to handle thecontext cannot be slept with because it's invalidexceptions appears during therclcpp::Rateusage w/o context. This exception raises in two cases described above, when test was already finished. So, this should be a simpler way to handle this, I suppose.