Skip to content

Commit a43709f

Browse files
authored
Port flaky test fix from web. (#2332)
Port flaky test fix from web. Port of firebase/firebase-js-sdk#1511
1 parent 11b5ddb commit a43709f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ - (void)testServerTimestampsWithConsecutiveUpdates {
220220
serverTimestampBehavior:FIRServerTimestampBehaviorPrevious],
221221
@42);
222222

223-
[_docRef updateData:@{@"a" : [FIRFieldValue fieldValueForServerTimestamp]}];
223+
// include b=1 to ensure there's a change resulting in a new snapshot.
224+
[_docRef updateData:@{@"a" : [FIRFieldValue fieldValueForServerTimestamp], @"b" : @1}];
224225
localSnapshot = [_accumulator awaitLocalEvent];
225226
XCTAssertEqualObjects([localSnapshot valueForField:@"a"
226227
serverTimestampBehavior:FIRServerTimestampBehaviorPrevious],

0 commit comments

Comments
 (0)