-
-
Notifications
You must be signed in to change notification settings - Fork 341
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: Fix asserts for SentryCrashTestInstallation #2500
Conversation
Two asserts wrapped with SentryCrashCRASH_HAS_UIAPPLICATION were not executed. This is fixed now.
@@ -62,7 +63,7 @@ - (void)testUninstall_CallsRemoveObservers | |||
[installation uninstall]; | |||
|
|||
#if SentryCrashCRASH_HAS_UIAPPLICATION | |||
XCTAssertEqual(5, self.notificationCenter.removeObserverWithNameInvocations.count); | |||
XCTAssertEqual(5, self.notificationCenter.removeObserverWithNameInvocationsCount); |
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.
m: I woud not add that new property and just keep using removeObserverWithNameInvocations.count
.
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.
That doesn't work as Invocations is not public to ObjC.
@@ -95,7 +96,7 @@ - (void)testUninstall_Install | |||
crashHandlerDataAfterInstall:crashHandlerDataAfterInstall]; | |||
|
|||
#if SentryCrashCRASH_HAS_UIAPPLICATION | |||
XCTAssertEqual(55, self.notificationCenter.removeObserverWithNameInvocations.count); | |||
XCTAssertEqual(55, self.notificationCenter.removeObserverWithNameInvocationsCount); |
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.
Same here
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## 8.0.0 #2500 +/- ##
==========================================
+ Coverage 78.38% 78.43% +0.05%
==========================================
Files 242 242
Lines 22273 22283 +10
Branches 9828 9832 +4
==========================================
+ Hits 17459 17478 +19
+ Misses 4361 4352 -9
Partials 453 453
Continue to review full report at Codecov.
|
@@ -1,8 +1,8 @@ | |||
import Foundation | |||
|
|||
@objc public class TestNSNotificationCenterWrapper: SentryNSNotificationCenterWrapper { | |||
@objcMembers public class TestNSNotificationCenterWrapper: SentryNSNotificationCenterWrapper { |
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.
TIL
* 8.0.0: (31 commits) tests: Reenable testAddAndRemoveData (#2533) feat: support SENTRY_DSN environment var on macOS (#2534) Remove duplicate entry (#2532) fix: ARC issue for FileManager (#2525) feat: Add SwiftUI performance tracking (#2271) fix: Remove all permission checks (#2529) Remove the automatic `viewAppearing` span (#2511) Fix and reenable testANRDetected_UpdatesAppStateToTrue (#2526) fix: Don't add out of date context for crashes (#2523) ref: Rename isOOM to watchdog in Client (#2520) test: Fix disabled failing watchdog test (#2521) build(deps): bump github/codeql-action from 2.1.35 to 2.1.36 (#2516) Rename the watchdog option and integration (#2513) feat: Enable CaptureFailedRequests by default (#2507) test: Fix asserts for SentryCrashTestInstallation (#2500) meta: User interaction tracing enabled per default (#2506) ref: Rename OOM to Watchdog Terminations (#2499) feat: enableUserInteractionTracing is GA (#2503) build(deps): bump nokogiri from 1.13.9 to 1.13.10 (#2505) perf: Don't attach headers for SentryNoOpSpan (#2498) ...
Two asserts wrapped with SentryCrashCRASH_HAS_UIAPPLICATION were not executed. This is fixed now.
Came up in #2440 (comment)
#skip-changelog