Skip to content

Commit 35ed477

Browse files
authored
[Infra] Re-enable tests disabled in #10995 (#11022)
* [Infra] Re-enable tests disabled in #10995 * [Infra] Print state when assertion fails
1 parent c1944e1 commit 35ed477

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Crashlytics/UnitTests/FIRCLSExistingReportManagerTests.m

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,14 @@ - (BOOL)reportPathAtIndex:(NSUInteger)index isReportID:(NSString *)reportID {
141141

142142
#pragma mark - Tests
143143

144-
// This test has been disabled due to a flake
145-
#if FIRCLS_FLAKY_TESTS_ENABLED
146144
- (void)testNoReports {
147145
[self.existingReportManager collectExistingReports];
148146

149147
[self.existingReportManager.operationQueue waitUntilAllOperationsAreFinished];
150148

151149
// Reports without events should be deleted
152-
XCTAssertEqual([[self contentsOfActivePath] count], 0);
150+
XCTAssertEqual([[self contentsOfActivePath] count], 0, @"Contents of active path: %@",
151+
[self contentsOfActivePath]);
153152
XCTAssertEqual(self.existingReportManager.unsentReportsCount, 0);
154153
XCTAssertEqual(self.existingReportManager.newestUnsentReport, nil);
155154
XCTAssertEqual(self.existingReportManager.existingUnemptyActiveReportPaths.count, 0);
@@ -164,12 +163,12 @@ - (void)testReportNoEvents {
164163
[self.existingReportManager.operationQueue waitUntilAllOperationsAreFinished];
165164

166165
// Reports without events should be deleted
167-
XCTAssertEqual([[self contentsOfActivePath] count], 0);
166+
XCTAssertEqual([[self contentsOfActivePath] count], 0, @"Contents of active path: %@",
167+
[self contentsOfActivePath]);
168168
XCTAssertEqual(self.existingReportManager.unsentReportsCount, 0);
169169
XCTAssertEqual(self.existingReportManager.newestUnsentReport, nil);
170170
XCTAssertEqual(self.existingReportManager.existingUnemptyActiveReportPaths.count, 0);
171171
}
172-
#endif
173172

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

Crashlytics/UnitTests/FIRCLSReportManagerTests.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,6 @@ - (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
312310
- (void)testExistingUnimportantReportOnStartWithDataCollectionDisabled {
313311
// create a report and put it in place
314312
[self createActiveReport];
@@ -321,7 +319,6 @@ - (void)testExistingUnimportantReportOnStartWithDataCollectionDisabled {
321319
XCTAssertEqual([self.prepareAndSubmitReportArray count], 0);
322320
XCTAssertEqual([self.uploadReportArray count], 0);
323321
}
324-
#endif
325322

326323
- (void)testExistingReportOnStart {
327324
// create a report and put it in place

0 commit comments

Comments
 (0)