Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore: Increase clock skew tolerance in FIRServerTimestampTests.mm #12190

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading