Skip to content

Commit 377c78b

Browse files
authored
test: disable flaky tests (getsentry#2288)
* 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 * 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 * 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 * rename to add _disabled suffix * fix skiipped test names with _disabled suffixes
1 parent ef8b0ce commit 377c78b

File tree

6 files changed

+22
-7
lines changed

6 files changed

+22
-7
lines changed

Samples/iOS-Swift/iOS-Swift.xcodeproj/xcshareddata/xcschemes/iOS-Swift.xcscheme

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
<Test
4242
Identifier = "SentryFileIOTrackingIntegrationTests/test_DataConsistency_readPath_disabled()">
4343
</Test>
44+
<Test
45+
Identifier = "SentryFileIOTrackingIntegrationTests/test_DataConsistency_readUrl_disabled()">
46+
</Test>
4447
</SkippedTests>
4548
</TestableReference>
4649
</Testables>

Sentry.xcodeproj/xcshareddata/xcschemes/Sentry.xcscheme

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,34 @@
5656
</BuildableReference>
5757
<SkippedTests>
5858
<Test
59-
Identifier = "SentryCrashIntegrationTests/testStartUpCrash_CallsFlush()">
59+
Identifier = "SentryCrashIntegrationTests/testStartUpCrash_CallsFlush_disabled()">
6060
</Test>
6161
<Test
6262
Identifier = "SentryFileIOTrackingIntegrationTests/test_DataConsistency_readPath_disabled()">
6363
</Test>
6464
<Test
65-
Identifier = "SentryFileIOTrackingIntegrationTests/test_DataConsistency_readUrl()">
65+
Identifier = "SentryFileIOTrackingIntegrationTests/test_DataConsistency_readUrl_disabled()">
6666
</Test>
6767
<Test
6868
Identifier = "SentryFileIOTrackingIntegrationTests/test_DataConsistency_readUrl_disabled()">
6969
</Test>
70+
<Test
71+
Identifier = "SentryHttpTransportTests/testFlush_CalledSequentially_BlocksTwice_disabled()">
72+
</Test>
73+
<Test
74+
Identifier = "SentryNetworkTrackerIntegrationTests/testGetRequest_SpanCreatedAndBaggageHeaderAdded_disabled()">
75+
</Test>
76+
<Test
77+
Identifier = "SentryNetworkTrackerIntegrationTests/testGetRequest_SpanCreatedAndBaggageHeaderAdded_disabled()">
78+
</Test>
79+
<Test
80+
Identifier = "SentryOutOfMemoryIntegrationTests/testANRDetected_UpdatesAppStateToTrue_disabled()">
81+
</Test>
7082
<Test
7183
Identifier = "SentrySDKIntegrationTestsBase">
7284
</Test>
7385
<Test
74-
Identifier = "SentrySessionGeneratorTests/testSendSessions()">
86+
Identifier = "SentrySessionGeneratorTests/testSendSessions_disabled()">
7587
</Test>
7688
<Test
7789
Identifier = "SentryStacktraceBuilderTests/testAsyncStacktraces_disabled()">

Tests/SentryTests/Integrations/OutOfMemory/SentryOutOfMemoryIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class SentryOutOfMemoryIntegrationTests: XCTestCase {
6363
}
6464

6565
#if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst)
66-
func testANRDetected_UpdatesAppStateToTrue() {
66+
func testANRDetected_UpdatesAppStateToTrue_disabled() {
6767
givenInitializedTracker()
6868

6969
Dynamic(sut).anrDetected()

Tests/SentryTests/Integrations/Performance/Network/SentryNetworkTrackerIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class SentryNetworkTrackerIntegrationTests: XCTestCase {
149149
XCTAssertEqual(1, breadcrumbs?.count)
150150
}
151151

152-
func testGetRequest_SpanCreatedAndBaggageHeaderAdded() {
152+
func testGetRequest_SpanCreatedAndBaggageHeaderAdded_disabled() {
153153
startSDK()
154154
let transaction = SentrySDK.startTransaction(name: "Test Transaction", operation: "TEST", bindToScope: true) as! SentryTracer
155155
let expect = expectation(description: "Request completed")

Tests/SentryTests/Integrations/Session/SentrySessionGeneratorTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class SentrySessionGeneratorTests: NotificationCenterTestCase {
6262
/**
6363
* Disabled on purpose. This test just sends sessions to Sentry, but doesn't verify that they arrive there properly.
6464
*/
65-
func testSendSessions() {
65+
func testSendSessions_disabled() {
6666
sendSessions(amount: Sessions(healthy: 10, errored: 10, crashed: 3, oom: 1, abnormal: 1))
6767
}
6868

Tests/SentryTests/Networking/SentryHttpTransportTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ class SentryHttpTransportTests: XCTestCase {
644644
assertFlushBlocksAndFinishesSuccessfully()
645645
}
646646

647-
func testFlush_CalledSequentially_BlocksTwice() {
647+
func testFlush_CalledSequentially_BlocksTwice_disabled() {
648648
CurrentDate.setCurrentDateProvider(DefaultCurrentDateProvider.sharedInstance())
649649

650650
givenCachedEvents()

0 commit comments

Comments
 (0)