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

fix: add pause for the staleness test #762

Merged
merged 2 commits into from
Jul 5, 2022

Conversation

IlyaFaer
Copy link
Contributor

@IlyaFaer IlyaFaer commented Jul 4, 2022

The test_staleness test is checking if reading with steleness is possible. It takes the timestamp, then inserts a row, then is trying to read the database by the timestamp taken before the insert. However, from time to time the inserted row is read. Not 100% sure about precision Cloud Spanner is using for staleness (in the docs it's said than 10 seconds staleness is recommended as the minimal bound), but it feels like from time to time taking the timestamp and the row insertion are done too fast, so Spanner considers that the row is already inserted at the moment of the timestamp. If so, adding a small pause between taking the timestamp and row insertion should fix the problem.

Closes #752

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: spanner Issues related to the googleapis/python-spanner API. labels Jul 4, 2022
@IlyaFaer IlyaFaer marked this pull request as ready for review July 4, 2022 07:47
@IlyaFaer IlyaFaer requested review from a team as code owners July 4, 2022 07:47
@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 5, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 5, 2022
@IlyaFaer
Copy link
Contributor Author

IlyaFaer commented Jul 5, 2022

@asthamohta, this one seems to be ready for merge

@asthamohta asthamohta merged commit bb7f1db into googleapis:main Jul 5, 2022
@IlyaFaer IlyaFaer deleted the staleness_flaky branch July 5, 2022 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests.system.test_dbapi: test_staleness failed
3 participants