-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add unit test coverage for racing updaters #2292
Conversation
It would be good to also add some coverage in update_client::UrlFetcherDownloader; we can plan to do that in a separate change. b/309841211 Change-Id: I6505843004aafc920a1a7e84a6c61551dbbbb7a3
@oxve @sideb0ard, please let me know if you have any feedback on the style of the tests. For example, an argument could be made to stub or fake out the drain file / file system dependency in |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2292 +/- ##
==========================================
+ Coverage 58.53% 58.55% +0.02%
==========================================
Files 1904 1904
Lines 94522 94522
==========================================
+ Hits 55324 55346 +22
+ Misses 39198 39176 -22 ☔ View full report in Codecov by Sentry. |
I don't see an issue with using real files. Like you say, it follows the existing pattern. What files is this change supposed to increase coverage in? Looking at the codecov report I couldn't see any obvious candidates. I want to make sure that there aren't more files that are missing in the coverage report. |
Cool, sounds good. Re coverage, this change adds tests that cover important behaviors in two modules, but the impact on actual covered lines should be very small (or possibly zero)... Coverage should be added for lines 191 and 192 at https://github.com/youtube/cobalt/blob/main/components/update_client/cobalt_slot_management.cc#L191. But I think this entire file is excluded from coverage reports since it isn't under No new lines are covered in https://github.com/youtube/cobalt/blob/main/starboard/loader_app/drain_file.cc; the new test should just cause |
@y4vor can you please take a look at the new tests? |
It would be good to also add some coverage in
update_client::UrlFetcherDownloader; we can plan to do that in a separate change.
b/309841211
Change-Id: I6505843004aafc920a1a7e84a6c61551dbbbb7a3