Skip to content

test: Improve for CrashInstallationReporterTests#3595

Merged
philipphofmann merged 1 commit into
mainfrom
test/crash-installation-reporter
Jan 31, 2024
Merged

test: Improve for CrashInstallationReporterTests#3595
philipphofmann merged 1 commit into
mainfrom
test/crash-installation-reporter

Conversation

@philipphofmann

@philipphofmann philipphofmann commented Jan 30, 2024

Copy link
Copy Markdown
Member

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. testReportIsSentAndDeleted in 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

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

codecov Bot commented Jan 30, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (52e4912) 89.275% compared to head (3f1d4d5) 89.235%.
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@              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     
Files Coverage Δ
...ryCrash/SentryCrashInstallationReporterTests.swift 100.000% <100.000%> (ø)

... and 16 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52e4912...3f1d4d5. Read the comment docs.

@philipphofmann
philipphofmann merged commit e003030 into main Jan 31, 2024
@philipphofmann
philipphofmann deleted the test/crash-installation-reporter branch January 31, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants