Skip to content

fix: add pause for the staleness test#762

Merged
asthamohta merged 2 commits intogoogleapis:mainfrom
MaxxleLLC:staleness_flaky
Jul 5, 2022
Merged

fix: add pause for the staleness test#762
asthamohta merged 2 commits intogoogleapis:mainfrom
MaxxleLLC:staleness_flaky

Conversation

@IlyaFaer
Copy link
Copy Markdown

@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 requested review from asthamohta July 4, 2022 07:47
@IlyaFaer IlyaFaer marked this pull request as ready for review July 4, 2022 07:47
@IlyaFaer IlyaFaer requested a review from a team as a code owner July 4, 2022 07:47
@IlyaFaer IlyaFaer requested a review from a team 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
Copy Markdown
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