Skip to content

Commit ad72e9e

Browse files
authored
test(firestore): fix another readtime clamping expectation (#20074)
1 parent 7843ebf commit ad72e9e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

firestore/integration_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3459,11 +3459,12 @@ func testIntegrationClientReadTime(t *testing.T) {
34593459
t.Fatal(err)
34603460
}
34613461

3462-
wantReadTime := tm.Truncate(time.Second)
3462+
wantReadTime := tm.Truncate(time.Microsecond)
34633463
for _, d := range ds {
3464-
if !wantReadTime.Equal(d.ReadTime) {
3464+
gotTrunc := d.ReadTime.Truncate(time.Microsecond)
3465+
if !wantReadTime.Equal(gotTrunc) {
34653466
t.Errorf("wanted read time: %v; got: %v",
3466-
tm.UnixNano(), d.ReadTime.UnixNano())
3467+
wantReadTime, gotTrunc)
34673468
}
34683469
}
34693470
}

0 commit comments

Comments
 (0)