Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Dec 11, 2023

Conversation

bhshkh
Copy link
Contributor

@bhshkh bhshkh commented Dec 5, 2023

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 as code owners 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
Copy link
Contributor

@gkevinzheng gkevinzheng left a comment

Choose a reason for hiding this comment

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

LGTM

@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
9 checks passed
@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