sentry-cocoa
sentry-cocoa copied to clipboard
ANR tracker running unnecessarily in tests
Description
I noticed the ANR tracker messing up some tyest logs in CI, and it's not clear to me that it shopuld even be running at this time:
Test Suite 'UrlSanitizedTests' started at 2024-08-02 03:32:38.741
Test Case '-[SentryTests.UrlSanitizedTests testFilterOutUserPasswordNoQuery]' started.
Test Case '-[SentryTests.UrlSanitizedTests testFilterOutUserPasswordNoQuery]' passed (0.001 seconds).
Test Case '-[SentryTests.UrlSanitizedTests testFilterOutUserPasswordWithQuery]' started.
Test Case '-[SentryTests.UrlSanitizedTests testFilterOutUserPasswordWithQuery]' passed (0.001 seconds).
[Sentry] [warning] [SentryANRTracker:128] ANR detected.
[Sentry] [warning] [SentryANRTracker:128] ANR detected.
[Sentry] [warning] [SentryANRTracker:128] ANR detected.
Test Case '-[SentryTests.UrlSanitizedTests testNoQueryAndFragment]' started.
Test Case '-[SentryTests.UrlSanitizedTests testNoQueryAndFragment]' passed (0.001 seconds).
Test Case '-[SentryTests.UrlSanitizedTests testWithQueryAndFragment]' started.
Test Case '-[SentryTests.UrlSanitizedTests testWithQueryAndFragment]' passed (0.001 seconds).
Test Suite 'UrlSanitizedTests' passed at 2024-08-02 03:32:38.814.
Executed 4 tests, with 0 failures (0 unexpected) in 0.004 (0.073) seconds
Test Suite 'SentryTests.xctest' passed at 2024-08-02 03:32:38.814.
Executed 2404 tests, with 0 failures (0 unexpected) in 145.289 (152.407) seconds
Test Suite 'Selected tests' passed at 2024-08[Sentry] [warning] [SentryANRTracker:128] ANR detected.
-02 03:32:38.817.
Executed 2404 tests, with 0 failures (0 unexpected) in 145.289 (152.411) seconds
[Sentry] [warning] [SentryANRTracker:92] ANR stopped.
[Sentry] [warning] [SentryANRTracker:92] ANR stopped.
[Sentry] [warning] [SentryANRTracker:92] ANR stopped.
[Sentry] [warning] [SentryANRTracker:92] ANR stopped.
[Sentry] [debug] The following UIViewControllers will generate automatic transactions:
[Sentry] [debug] The following UIViewControllers will generate automatic transactions: SentryTests.ViewWithLoadViewController, SentryTests.TestViewController, _TtCFC11SentryTests28SentryBreadcrumbTrackerTests68testSwizzlingStarted_ViewControllerAppears_AddsUILifeCycleBreadcrumbFzT_T_L_22ParentUIViewController, _TtCC11SentryTests16SentryClientTestP33_CBF725B569C8516D1A4F96B7BEF0F0B824ClientTestViewController, SentryTests.FirstViewController, SentryTests.SecondViewController, SentryTests.ViewControllerNumberThree, SentryTests.VCAnyNaming
[Sentry] [debug] The following UIViewControllers will generate automatic transactions:
[Sentry] [debug] The following UIViewControllers will generate automatic transactions: SentryTests.ViewWithLoadViewController, SentryTests.TestViewController, _TtCFC11SentryTests28SentryBreadcrumbTrackerTests68testSwizzlingStarted_ViewControllerAppears_AddsUILifeCycleBreadcrumbFzT_T_L_22ParentUIViewController, _TtCC11SentryTests16SentryClientTestP33_CBF725B569C8516D1A4F96B7BEF0F0B824ClientTestViewController, SentryTests.FirstViewController, SentryTests.SecondViewController, SentryTests.ViewControllerNumberThree, SentryTests.VCAnyNaming
[Sentry] [debug] [SentryFramesTracker:230] Detected slow frame starting at 1822779684951 (frame tracker: <SentryFramesTracker: 0x600007274f80>).
[Sentry] [debug] [SentryFramesTracker:230] Detected slow frame starting at 1822801643169 (frame tracker: <SentryFramesTracker: 0x600007274f80>).
[Sentry] [warning] [SentryANRTracker:128] ANR detected.
[Sentry] [warning] [SentryANRTracker:128] ANR detected.
[Sentry] [warning] [SentryANRTracker:128] ANR detected.
[Sentry] [warning] [SentryANRTracker:128] ANR detected.
2024-08-02 03:32:41.565725+0000 xctest[7471:37375] [client] Timed out waiting for the exit barrier block. activeSendTransactions=0
Test Suite 'Selected tests' started at 2024-08-02 03:32:59.591
Test Suite 'SentryProfilerTests.xctest' started at 2024-08-02 03:32:59.591
I'm not sure whether it's responsible for the false negative test failure in this run: https://github.com/getsentry/sentry-cocoa/actions/runs/10189187731/job/28247524080?pr=4215
Makes sense to disable it. We should disable pretty much everything that is not being tested.
Closing this as I haven't seen adverse effects or noticed it in a while. If it causes problems, we can reopen and investigate.