On Feb 15, 3:27 pm, naan <kaz...@gmail.com> wrote:
> It's great that SDK 1.3.1 automatically retries timeouted datastore
> operation, but I still get enough timeout error on my instance.
>
> The problem of dealing with timeout is there's no way to do unit
> testing with timeout error. If SDK has some kind of "Emulate datestore
> timeout" options, it would be very helpful.

if you're using methods on the Model or Expando class, you can easily
mock them out with a library like mox and have them raise any
exception you want, or do anything else. if you're using db module
functions directly, you can mock out the entire db module in the same
way.

if you prefer not to use a mock library, you can monkey patch
manually, e.g.:

db.put = lambda x: raise db.Timeout()

-- 
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-appeng...@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