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: Improve test cleanup. #234

Merged
merged 1 commit into from
Nov 7, 2019

Conversation

chrisrossi
Copy link
Contributor

Make sure that dispose_of is called immediately after storing an
entity to make sure an error in the test doesn't prevent the entities
from getting cleaned up.

Make sure that `dispose_of` is called immediately after storing an
entity to make sure an error in the test doesn't prevent the entities
from getting cleaned up.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 7, 2019
@chrisrossi
Copy link
Contributor Author

Looking at the transient errors from earlier this week, it shouldn't be possible for eventual consistency to have caused them. However, it is possible that the exception in the entity cleanup code is actually masking the true error, which actually does have to do with eventual consistency. This fix aims to prevent the entity cleanup code from potentially masking other errors by making sure there's not an opportunity to produce an error between when an entity is saved to Datastore and when dispose_of is called.

Copy link
Contributor

@andrewsg andrewsg left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants