Skip to content

Commit

Permalink
test(datastore): Truncate transaction read time to millisecond (#8473)
Browse files Browse the repository at this point in the history
* fix(datastore): Truncate transaction read time to millisecond

* fix(datastore): Truncate transaction read time to microsecond
  • Loading branch information
bhshkh committed Aug 23, 2023
1 parent 3dda7b2 commit 14aa857
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datastore/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ func TestIntegration_AggregationQueries(t *testing.T) {
}

// Create transaction with read before creating entities
readTime := time.Now()
readTime := time.Now().Truncate(time.Microsecond)
txBeforeCreate, err := client.NewTransaction(ctx, []TransactionOption{ReadOnly, WithReadTime(readTime)}...)
if err != nil {
t.Fatalf("client.NewTransaction: %v", err)
Expand All @@ -742,7 +742,7 @@ func TestIntegration_AggregationQueries(t *testing.T) {
}()

// Create transaction with read after creating entities
readTime = time.Now()
readTime = time.Now().Truncate(time.Microsecond)
txAfterCreate, err := client.NewTransaction(ctx, []TransactionOption{ReadOnly, WithReadTime(readTime)}...)
if err != nil {
t.Fatalf("client.NewTransaction: %v", err)
Expand Down

0 comments on commit 14aa857

Please sign in to comment.