Skip to content

Commit a294c27

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

firebase-firestore/src/androidTest/java/com/google/firebase/firestore/ServerTimestampTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ public void testServerTimestampsCanRetainPreviousValueThroughConsecutiveUpdates(
215215
DocumentSnapshot localSnapshot = accumulator.awaitLocalEvent();
216216
assertEquals(42L, localSnapshot.get("a", ServerTimestampBehavior.PREVIOUS));
217217

218-
docRef.update("a", FieldValue.serverTimestamp());
218+
// include b=1 to ensure there's a change resulting in a new snapshot.
219+
docRef.update("a", FieldValue.serverTimestamp(), "b", 1);
219220
localSnapshot = accumulator.awaitLocalEvent();
220221
assertEquals(42L, localSnapshot.get("a", ServerTimestampBehavior.PREVIOUS));
221222

0 commit comments

Comments
 (0)