The question is, how are you getting past the issue in the real
application? You might be able to make your tests pass in the same
way.

For example, do your users not care that their data doesn't appear
straight away? If so, your test might not care either?
If they do care, maybe you should use the memcache to store the data
as well as the datastore, in which case you can test that the data
appears - even if it's from the memcache.

Then perhaps write a test later on in your plan to make sure that all
data appears in the datastore eventually? I'm not sure how long this
needs to be - perhaps someone can tell us how long the datastores
(both development and production) take to make the data appear. I'm
guessing that the development one has a fixed maximum time whereas the
production one will have an average time and someone might have data
for standard deviations from this or maximum times seen in real life?

On 12 October 2011 10:41, andrew <andrew.macken...@bcntouch.com> wrote:
> A common test strategy for results that may vary (e.g. more used when
> measuring timings etc) would be:
> - discard the most unreliable result (first read, last read etc)
> - read the result a number of times and then look at the majority
> result, or allow a maximum number of failure results for a given
> number of tries.
> - repeat the test case a number of times, and depending on the known
> logic of failures, decide the outcome (e.g. have a maximum number/% of
> fails or a minimum number/% of successes)
>
> But obviously better would be to find a way to fore the "eventual
> consistency" of the data store. I am not yet familiar with HRD, but
> maybe you can perform one read, discard that result, wait a short time
> and then perform the read that decides test case pass/fail?
>
> Maybe a second write to the same entity would force it? Need to check
> details on HRD and eventual consistency to come up with a foolproof
> method....
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to