test: Improve for CrashInstallationReporterTests#3595
Merged
Conversation
Use the same options when installing the SentryCrashInstallationReporter and starting the SDK so SentryCrashInstallationReporter.install doesn't have to retrieve the cacheDirectoryPath from the PrivateSentrySDKOnly. Furthermore, validate that the TestClient has a captured crash event.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3595 +/- ##
=============================================
- Coverage 89.275% 89.235% -0.040%
=============================================
Files 529 529
Lines 57793 57802 +9
Branches 20682 20688 +6
=============================================
- Hits 51595 51580 -15
- Misses 5174 5194 +20
- Partials 1024 1028 +4
... and 16 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
brustolin
approved these changes
Jan 30, 2024
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.
Use the same options when installing the SentryCrashInstallationReporter and starting the SDK so SentryCrashInstallationReporter.install doesn't have to retrieve the cacheDirectoryPath from the PrivateSentrySDKOnly. Furthermore, validate that the TestClient has a captured crash event.
I noticed this while investigating the flaky test
SentryCrashInstallationReporter. testReportIsSentAndDeletedin CI https://github.com/getsentry/sentry-cocoa/actions/runs/7709958370/job/21012298308?pr=3594. While the change might not solve the flaky test 100%, it improves the quality of the tests.#skip-changelog