-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Adding system test for datastore failed transactions. #1055
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
Conversation
with self.assertRaises(Conflict): | ||
txn.commit() | ||
|
||
CLIENT._pop_batch() |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This intentionally forces data contention in a transaction (by updating the entity outside of the transaction). This is to prevent regressions like googleapis#903.
41230aa
to
d04da8a
Compare
@tseaver I took a different approach, by creating a local client and using the global |
LGTM. That reads much better, too. |
Adding system test for datastore failed transactions.
@stephenplusplus @callmehiphop @ryanseys FYI we implemented a system test to make sure that a transaction would fail if we messed with the values outside of (but during) the transaction. This would have caught a serious regression we had (a month or two ago) where transaction IDs weren't being sent in requests. |
This intentionally forces data contention in a transaction (by updating the entity outside of the transaction).
This is to prevent regressions like #903.