From dd54527a788b1bae60013ddf2c3103aa040e6580 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Thu, 13 Oct 2022 09:56:24 -0800 Subject: [PATCH 1/5] disable flaky test_DataConsistency_readUrl_disabled it was disabled in the unit tests but not in the iOS-Swift scheme for its UI tests fail #1: https://github.com/getsentry/sentry-cocoa/actions/runs/3238645664/jobs/5307090889#step:4:1143 fail #2: https://github.com/getsentry/sentry-cocoa/actions/runs/3238645664/jobs/5307223688#step:4:1161 pass on rerun #3: https://github.com/getsentry/sentry-cocoa/actions/runs/3238645664/jobs/5307687742 --- .../xcshareddata/xcschemes/iOS-Swift.xcscheme | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Samples/iOS-Swift/iOS-Swift.xcodeproj/xcshareddata/xcschemes/iOS-Swift.xcscheme b/Samples/iOS-Swift/iOS-Swift.xcodeproj/xcshareddata/xcschemes/iOS-Swift.xcscheme index 19ea1dabdc..20ead11472 100644 --- a/Samples/iOS-Swift/iOS-Swift.xcodeproj/xcshareddata/xcschemes/iOS-Swift.xcscheme +++ b/Samples/iOS-Swift/iOS-Swift.xcodeproj/xcshareddata/xcschemes/iOS-Swift.xcscheme @@ -41,6 +41,9 @@ + + From ffb876c04bde3800c97a7375fb4ebdb43ec1cc52 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Thu, 13 Oct 2022 09:59:19 -0800 Subject: [PATCH 2/5] disable flaky unit tests - `testGetRequest_SpanCreatedAndBaggageHeaderAdded` fails in https://github.com/getsentry/sentry-cocoa/actions/runs/3238645664/jobs/5307104221#step:9:49 and passes in subsequent try in https://github.com/getsentry/sentry-cocoa/actions/runs/3238645664/jobs/5307688649 - `testFlush_CalledSequentially_BlocksTwice` fails in https://github.com/getsentry/sentry-cocoa/actions/runs/3238645664/jobs/5307104166#step:9:39 and passes in subsequent try in https://github.com/getsentry/sentry-cocoa/actions/runs/3238645664/jobs/5307688591 --- Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme b/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme index e2e8db4604..ed73d15faf 100644 --- a/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme +++ b/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme @@ -67,6 +67,12 @@ + + + + From df73ba7770602d2c4453573f6d39ca79e6d424b9 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Thu, 13 Oct 2022 10:01:56 -0800 Subject: [PATCH 3/5] disable flaky testANRDetected_UpdatesAppStateToTrue fails in https://github.com/getsentry/sentry-cocoa/actions/runs/3239188699/jobs/5308324227#step:9:39 and passes after retry in https://github.com/getsentry/sentry-cocoa/actions/runs/3239188699/jobs/5320658454 --- Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme b/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme index ed73d15faf..7de75422a4 100644 --- a/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme +++ b/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme @@ -73,6 +73,9 @@ + + From 0d1d9d9e649cebf7510727c2e1ce61fc8be7e4f0 Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Thu, 13 Oct 2022 10:07:08 -0800 Subject: [PATCH 4/5] rename to add _disabled suffix --- .../OutOfMemory/SentryOutOfMemoryIntegrationTests.swift | 2 +- .../Network/SentryNetworkTrackerIntegrationTests.swift | 2 +- Tests/SentryTests/Networking/SentryHttpTransportTests.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/SentryTests/Integrations/OutOfMemory/SentryOutOfMemoryIntegrationTests.swift b/Tests/SentryTests/Integrations/OutOfMemory/SentryOutOfMemoryIntegrationTests.swift index 12d4300220..6c307654d3 100644 --- a/Tests/SentryTests/Integrations/OutOfMemory/SentryOutOfMemoryIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/OutOfMemory/SentryOutOfMemoryIntegrationTests.swift @@ -63,7 +63,7 @@ class SentryOutOfMemoryIntegrationTests: XCTestCase { } #if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) - func testANRDetected_UpdatesAppStateToTrue() { + func testANRDetected_UpdatesAppStateToTrue_disabled() { givenInitializedTracker() Dynamic(sut).anrDetected() diff --git a/Tests/SentryTests/Integrations/Performance/Network/SentryNetworkTrackerIntegrationTests.swift b/Tests/SentryTests/Integrations/Performance/Network/SentryNetworkTrackerIntegrationTests.swift index bd17eabb44..7b864a3969 100644 --- a/Tests/SentryTests/Integrations/Performance/Network/SentryNetworkTrackerIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/Performance/Network/SentryNetworkTrackerIntegrationTests.swift @@ -149,7 +149,7 @@ class SentryNetworkTrackerIntegrationTests: XCTestCase { XCTAssertEqual(1, breadcrumbs?.count) } - func testGetRequest_SpanCreatedAndBaggageHeaderAdded() { + func testGetRequest_SpanCreatedAndBaggageHeaderAdded_disabled() { startSDK() let transaction = SentrySDK.startTransaction(name: "Test Transaction", operation: "TEST", bindToScope: true) as! SentryTracer let expect = expectation(description: "Request completed") diff --git a/Tests/SentryTests/Networking/SentryHttpTransportTests.swift b/Tests/SentryTests/Networking/SentryHttpTransportTests.swift index 4975dd2a2f..5b44c81587 100644 --- a/Tests/SentryTests/Networking/SentryHttpTransportTests.swift +++ b/Tests/SentryTests/Networking/SentryHttpTransportTests.swift @@ -644,7 +644,7 @@ class SentryHttpTransportTests: XCTestCase { assertFlushBlocksAndFinishesSuccessfully() } - func testFlush_CalledSequentially_BlocksTwice() { + func testFlush_CalledSequentially_BlocksTwice_disabled() { CurrentDate.setCurrentDateProvider(DefaultCurrentDateProvider.sharedInstance()) givenCachedEvents() From 882b6663dee8f0a9aa22ed1ff387baef178d120a Mon Sep 17 00:00:00 2001 From: Andrew McKnight Date: Thu, 13 Oct 2022 10:56:41 -0800 Subject: [PATCH 5/5] fix skiipped test names with _disabled suffixes --- .../xcshareddata/xcschemes/Sentry.xcscheme | 15 +++++++++------ .../Session/SentrySessionGeneratorTests.swift | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme b/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme index 7de75422a4..5de564f718 100644 --- a/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme +++ b/Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme @@ -56,31 +56,34 @@ + Identifier = "SentryCrashIntegrationTests/testStartUpCrash_CallsFlush_disabled()"> + Identifier = "SentryFileIOTrackingIntegrationTests/test_DataConsistency_readUrl_disabled()"> + Identifier = "SentryHttpTransportTests/testFlush_CalledSequentially_BlocksTwice_disabled()"> + + + Identifier = "SentryNetworkTrackerIntegrationTests/testGetRequest_SpanCreatedAndBaggageHeaderAdded_disabled()"> + Identifier = "SentryOutOfMemoryIntegrationTests/testANRDetected_UpdatesAppStateToTrue_disabled()"> + Identifier = "SentrySessionGeneratorTests/testSendSessions_disabled()"> diff --git a/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift b/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift index 4b9fa79644..aa57b4011f 100644 --- a/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift +++ b/Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift @@ -62,7 +62,7 @@ class SentrySessionGeneratorTests: NotificationCenterTestCase { /** * Disabled on purpose. This test just sends sessions to Sentry, but doesn't verify that they arrive there properly. */ - func testSendSessions() { + func testSendSessions_disabled() { sendSessions(amount: Sessions(healthy: 10, errored: 10, crashed: 3, oom: 1, abnormal: 1)) }