Skip to content

Commit c03dc3f

Browse files
make ios timestamp test stable
1 parent 3f28db6 commit c03dc3f

File tree

1 file changed

+2
-2
lines changed
  • firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore

1 file changed

+2
-2
lines changed

firebase-firestore/src/commonTest/kotlin/dev/gitlive/firebase/firestore/firestore.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ class FirebaseFirestoreTest {
476476

477477
val timestamp = Timestamp.now()
478478

479-
val pastTimestamp = Timestamp(timestamp.seconds - 60, timestamp.nanoseconds)
480-
val futureTimestamp = Timestamp(timestamp.seconds + 60, timestamp.nanoseconds)
479+
val pastTimestamp = Timestamp(timestamp.seconds - 60, 12345000) // note: iOS truncates 3 last digits of nanoseconds due to internal conversions
480+
val futureTimestamp = Timestamp(timestamp.seconds + 60, 78910000)
481481

482482
collection.add(DocumentWithTimestamp(pastTimestamp))
483483
collection.add(DocumentWithTimestamp(futureTimestamp))

0 commit comments

Comments
 (0)