Skip to content

Commit

Permalink
Add new firestore-nightly workflow (#12180)
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-hui authored and ncooke3 committed Dec 15, 2023
1 parent a8264f0 commit 3d6b9f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/firestore-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
name: firestore_nightly

on:
pull_request:
workflow_dispatch:
schedule:
# Run every day at 2am (PST) - cron uses UTC times
- cron: '0 10 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,13 @@ - (void)verifyTimestampsInSnapshot:(FIRDocumentSnapshot *)snapshot

/** Verifies a snapshot containing _setData but with resolved server timestamps. */
- (void)verifySnapshotWithResolvedTimestamps:(FIRDocumentSnapshot *)snapshot {
// Tolerate up to 200 seconds of clock skew between client and server.
NSInteger tolerance = 200;
// 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;
}

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

0 comments on commit 3d6b9f5

Please sign in to comment.