Skip to content

Commit 7220efb

Browse files
authored
Turn off flaky Crashlytics tests (#10995)
1 parent af727e3 commit 7220efb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Crashlytics/UnitTests/FIRCLSExistingReportManagerTests.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ - (BOOL)reportPathAtIndex:(NSUInteger)index isReportID:(NSString *)reportID {
136136

137137
#pragma mark - Tests
138138

139+
// This test has been disabled due to a flake
140+
#if FIRCLS_FLAKY_TESTS_ENABLED
139141
- (void)testNoReports {
140142
[self.existingReportManager collectExistingReports];
141143

@@ -162,6 +164,7 @@ - (void)testReportNoEvents {
162164
XCTAssertEqual(self.existingReportManager.newestUnsentReport, nil);
163165
XCTAssertEqual(self.existingReportManager.existingUnemptyActiveReportPaths.count, 0);
164166
}
167+
#endif
165168

166169
- (void)testUnsentReportsUnderLimit {
167170
[self createActiveReportWithID:@"report_A" time:12312 withEvents:YES];

Crashlytics/UnitTests/FIRCLSReportManagerTests.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ - (void)testMetricKitResolvesPromiseIfNoDiagnostics {
307307
[self waitForPromise:[self startReportManagerWithDataCollectionEnabled:YES] withTimeout:4];
308308
}
309309

310+
// This test has been disabled due to a flake
311+
#if FIRCLS_FLAKY_TESTS_ENABLED
310312
- (void)testExistingUnimportantReportOnStartWithDataCollectionDisabled {
311313
// create a report and put it in place
312314
[self createActiveReport];
@@ -319,6 +321,7 @@ - (void)testExistingUnimportantReportOnStartWithDataCollectionDisabled {
319321
XCTAssertEqual([self.prepareAndSubmitReportArray count], 0);
320322
XCTAssertEqual([self.uploadReportArray count], 0);
321323
}
324+
#endif
322325

323326
- (void)testExistingReportOnStart {
324327
// create a report and put it in place

Crashlytics/UnitTests/FIRCLSReportUploaderTests.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ - (void)setupUploaderWithInstallations:(FIRMockInstallations *)installations {
9898
#pragma mark - Tests
9999

100100
- (void)testPrepareReport {
101-
NSString *path = [self.fileManager.activePath stringByAppendingPathComponent:@"pkg_uuid"];
102-
FIRCLSInternalReport *report = [[FIRCLSInternalReport alloc] initWithPath:path];
101+
FIRCLSInternalReport *report = [[FIRCLSInternalReport alloc] initWithPath:[self packagePath]];
103102
self.fileManager.moveItemAtPathResult = [NSNumber numberWithInt:1];
104103

105104
XCTAssertNil(self.uploader.fiid);
@@ -117,8 +116,7 @@ - (void)testPrepareReport {
117116
}
118117

119118
- (void)test_NilFIID_DoesNotCrash {
120-
NSString *path = [self.fileManager.activePath stringByAppendingPathComponent:@"pkg_uuid"];
121-
FIRCLSInternalReport *report = [[FIRCLSInternalReport alloc] initWithPath:path];
119+
FIRCLSInternalReport *report = [[FIRCLSInternalReport alloc] initWithPath:[self packagePath]];
122120
self.fileManager.moveItemAtPathResult = [NSNumber numberWithInt:1];
123121

124122
self.mockInstallations = [[FIRMockInstallations alloc]

0 commit comments

Comments
 (0)