google app engine - Running XG Transactions in GAE Python -
I am trying to prepare automatic local unit tests for my app engine application, running on the python.
It seems that whenever I am trying to call for a transaction which is a cross group ((XG = true)), the transaction simply does not work and the value is not accumulated Are there.
Since I know that XG transactions need HRD, I have placed these lines:
self.policy = datastore_stub_util.seselectorrandomHRConsistencyPolicy (probability = 0) self .testbed.init_datastore_v3_stub (compatibility_polis = self-polio)
To simulate HRD
However - still nothing.
Note that all functions work very well both in development and production. Just not in the unit test
Any ideas?
probability = 0
means that the results will never be consistent, You probably want to set it instead of 1.
This means that how the behavior of your tests works in different environments, is different, but if the query is just to verify the code you have verified, then it is OK . (If the query is part of the code you are testing, then the code is probably wrong, and the tests are worth the failure.)
Comments
Post a Comment