Skip to content
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

ANR tracker running unnecessarily in tests #4254

Open
armcknight opened this issue Aug 7, 2024 · 1 comment
Open

ANR tracker running unnecessarily in tests #4254

armcknight opened this issue Aug 7, 2024 · 1 comment

Comments

@armcknight
Copy link
Member

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

@brustolin
Copy link
Contributor

Makes sense to disable it. We should disable pretty much everything that is not being tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants