Skip to content

Commit

Permalink
Firestore: Increase clock skew tolerance in FIRServerTimestampTests.mm (
Browse files Browse the repository at this point in the history
  • Loading branch information
dconeybe authored Dec 13, 2023
1 parent 97fb5c2 commit 5fba1e7
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,8 @@ - (void)verifyTimestampsInSnapshot:(FIRDocumentSnapshot *)snapshot

/** Verifies a snapshot containing _setData but with resolved server timestamps. */
- (void)verifySnapshotWithResolvedTimestamps:(FIRDocumentSnapshot *)snapshot {
// Tolerate up to 10 seconds of clock skew between client and server.
NSInteger tolerance = 10;

// Somehow the skew is much worse in nightly
if ([self.db.settings.host isEqualToString:@"test-firestore.sandbox.googleapis.com"]) {
tolerance = 200;
}
// Tolerate up to 200 seconds of clock skew between client and server.
NSInteger tolerance = 200;

XCTAssertTrue(snapshot.exists);
FIRTimestamp *when = snapshot[@"when"];
Expand Down

0 comments on commit 5fba1e7

Please sign in to comment.