Skip to content

Commit 2966cb0

Browse files
authored
[Infra] Print state of invalid assertion to help identify cause of flake (#11020)
1 parent 9613e1e commit 2966cb0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Crashlytics/UnitTests/FIRCLSExistingReportManagerTests.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ - (void)testUnsentReportsUnderLimit {
177177
[self.existingReportManager.operationQueue waitUntilAllOperationsAreFinished];
178178

179179
// Reports with events should be kept if there's less than MAX_UNSENT_REPORTS reports
180-
XCTAssertEqual([[self contentsOfActivePath] count], FIRCLSMaxUnsentReports);
180+
XCTAssertEqual([[self contentsOfActivePath] count], FIRCLSMaxUnsentReports,
181+
@"Contents of active path: %@", [self contentsOfActivePath]);
181182
XCTAssertEqual(self.existingReportManager.unsentReportsCount, FIRCLSMaxUnsentReports);
182183
XCTAssertEqual(self.existingReportManager.existingUnemptyActiveReportPaths.count,
183184
FIRCLSMaxUnsentReports);
@@ -208,7 +209,8 @@ - (void)testUnsentReportsOverLimit {
208209
[self.existingReportManager.operationQueue waitUntilAllOperationsAreFinished];
209210

210211
// Remove any reports over the limit, starting with the oldest
211-
XCTAssertEqual([[self contentsOfActivePath] count], FIRCLSMaxUnsentReports);
212+
XCTAssertEqual([[self contentsOfActivePath] count], FIRCLSMaxUnsentReports,
213+
@"Contents of active path: %@", [self contentsOfActivePath]);
212214
XCTAssertEqual(self.existingReportManager.unsentReportsCount, FIRCLSMaxUnsentReports);
213215
XCTAssertEqual(self.existingReportManager.existingUnemptyActiveReportPaths.count,
214216
FIRCLSMaxUnsentReports);

0 commit comments

Comments
 (0)