Skip to content

Commit d47b7c0

Browse files
author
Michael Lehenbauer
committed
Port flaky test fix from web.
Port of firebase/firebase-js-sdk#1511
1 parent 388f267 commit d47b7c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

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

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

0 commit comments

Comments
 (0)