to fix flaky test about TestTimeSource.callbacks#2111
Merged
clalancette merged 1 commit intoros2:rollingfrom Feb 24, 2023
Merged
to fix flaky test about TestTimeSource.callbacks#2111clalancette merged 1 commit intoros2:rollingfrom
clalancette merged 1 commit intoros2:rollingfrom
Conversation
Signed-off-by: Chen Lihui <lihui.chen@sony.com>
Collaborator
Author
|
I mentioned this flaky test in #1995 (comment), which points to reason. |
clalancette
approved these changes
Feb 24, 2023
Contributor
clalancette
left a comment
There was a problem hiding this comment.
Looks good to me with green CI.
Collaborator
|
this addresses #2093 |
Collaborator
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.
I encounter the falky test about TestTimeSource.callbacks some times.
Flaky test failure history:
https://build.ros2.org/job/Rpr__rclcpp__ubuntu_jammy_amd64/602/
https://build.ros2.org/job/Rpr__rclcpp__ubuntu_jammy_amd64/597/
https://build.ros2.org/job/Rpr__rclcpp__ubuntu_jammy_amd64/547/
https://build.ros2.org/job/Rpr__rclcpp__ubuntu_jammy_amd64/530/
Let me explain why the flaky test happened.
If
rclcpp/rclcpp/test/rclcpp/test_time_source.cpp
Line 406 in 432bf21
the
ros_clockis set with 4.000001000s at this moment,While calling
rclcpp/rclcpp/test/rclcpp/test_time_source.cpp
Line 425 in 432bf21
and if the message published by
clock_pubinrclcpp/rclcpp/test/rclcpp/test_time_source.cpp
Line 143 in 432bf21
clock_subin some situation, theclock->now().nanoseconds() >= end_time.count()will be always True and return so quick that the new callbackrclcpp/rclcpp/test/rclcpp/test_time_source.cpp
Line 421 in 432bf21