Making regression test put()'s transactional.#562
Merged
dhermes merged 1 commit intogoogleapis:masterfrom Jan 22, 2015
Merged
Conversation
This is to address flaky test failures. See googleapis#535 for more discussion.
Contributor
|
LGTM |
dhermes
added a commit
that referenced
this pull request
Jan 22, 2015
Making regression test put()'s transactional.
Contributor
Author
|
The second time regression tests were run after this PR, the flake still occurred: The code at question is with datastore.Transaction():
datastore.put([entity])
query = datastore.Query(kind='Person')
query.add_filter('linkedTo', '=', key)
stored_persons = list(query.fetch(limit=2))
self.assertEqual(len(stored_persons), 1)@pcostell does the |
Contributor
|
This doesn't actually do anything (a single put by itself is transactional). To make sure these tests always pass you need to make the entity have a parent then make the query do an ancestor query. |
Contributor
Author
|
Thanks. Sorry for the n00b question. I've been told that before, totally should not have forgotten. @tseaver I'll jump on fixing this. |
Contributor
|
No worries, it's easy to mix up. |
dhermes
added a commit
to dhermes/google-cloud-python
that referenced
this pull request
Jan 22, 2015
Using an ancestor in queries to ensure consistency. See googleapis#562 for context.
dhermes
added a commit
to dhermes/google-cloud-python
that referenced
this pull request
Jan 27, 2015
Using an ancestor in queries to ensure consistency. See googleapis#562 for context.
vchudnov-g
pushed a commit
that referenced
this pull request
Sep 20, 2023
Source-Link: googleapis/synthtool@fdba3ed Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:1f0dbd02745fb7cf255563dab5968345989308544e52b7f460deadd5e78e63b0
parthea
pushed a commit
that referenced
this pull request
Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea
pushed a commit
that referenced
this pull request
Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea
added a commit
that referenced
this pull request
Nov 24, 2025
parthea
pushed a commit
that referenced
this pull request
Nov 24, 2025
parthea
pushed a commit
that referenced
this pull request
Nov 25, 2025
parthea
pushed a commit
that referenced
this pull request
Nov 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is to address flaky test failures.
See #535 for more discussion.