Skip to content

test(datastore): Add explicit sleep before read time use - #9080

Merged
bhshkh merged 3 commits into
googleapis:mainfrom
bhshkh:issue/ds-9057
Dec 11, 2023
Merged

bhshkh merged 3 commits into
googleapis:mainfrom
bhshkh:issue/ds-9057

Conversation

@bhshkh

@bhshkh bhshkh commented Dec 5, 2023

Copy link
Copy Markdown
Contributor

The read time in this test is current time truncated to microseconds.
If there is a difference between the Datastore service clock and the test runner, the test fails with error:

=== RUN   TestIntegration_AggregationQueriesInTransaction
    retry.go:44: FAILED after 10 attempts:
        integration_test.go:818: client.NewTransaction: rpc error: code = InvalidArgument desc = The requested 'read_time' cannot be in the future.
--- FAIL: TestIntegration_AggregationQueriesInTransaction (100.71s)

Adding explicit sleep as part of this PR to avoid this sceanrio.

@bhshkh
bhshkh requested review from a team December 5, 2023 19:42
@product-auto-label product-auto-label Bot added size: xs Pull request size is extra small. api: datastore Issues related to the Datastore API. labels Dec 5, 2023
@bhshkh bhshkh linked an issue Dec 5, 2023 that may be closed by this pull request
@bhshkh
bhshkh requested a review from gkevinzheng December 5, 2023 23:45

@gkevinzheng gkevinzheng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread datastore/integration_test.go Resolved
@bhshkh
bhshkh enabled auto-merge (squash) December 6, 2023 18:40
@kolea2 kolea2 changed the title fix(datastore): Add explicit sleep before read time use test(datastore): Add explicit sleep before read time use Dec 11, 2023
@bhshkh
bhshkh merged commit 0538be4 into googleapis:main Dec 11, 2023
@bhshkh
bhshkh deleted the issue/ds-9057 branch December 11, 2023 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastore Issues related to the Datastore API. size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

datastore: TestIntegration_AggregationQueriesInTransaction failed

4 participants

⌂ 换网址