-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(autoware_universe_utils): make opencv_fast_atan2 test reproducible #9728
test(autoware_universe_utils): make opencv_fast_atan2 test reproducible #9728
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9728 +/- ##
==========================================
+ Coverage 28.33% 28.37% +0.03%
==========================================
Files 1485 1485
Lines 111092 111091 -1
Branches 43152 43151 -1
==========================================
+ Hits 31483 31520 +37
+ Misses 76588 76544 -44
- Partials 3021 3027 +6
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Max SCHMELLER <[email protected]>
4b4a316
to
b17d7ee
Compare
@soblin @takayuki5168 @TakaHoribe @veqcc can you review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for correcting my mistake 👍
It needs approvals from code owners
Description
PR #9710 made the random numbers used in the
trigonometry_opencv_fast_atan2
test random, but introduced made the test non-reproducible.The common wisdom is to initialize all random number generators used in unit tests with a fixed seed, so the same numbers are generated across test runs.
This PR does that for the abovementioned test.
Related links
How was this PR tested?
Printing x/y similar to #9710. Note how before this PR, the values change across runs, whereas with this PR they stay constant (reproducible).
Before:
After:
Effects on system behavior
None.