[google-appengine] Flushing async requests on development server for unit testing

2011-11-08 Thread Lenny Rachitsky
I'm finding that unit testing async based requests is rather tricky,
as the put() often doesn't finish by the time the unit test is run. Is
there any way to do a system-wide flush of all async requests on the
development server? The only other solution I have is to add if branch
that waits for the results to finish if it's on the dev server.

Any advice would be much appreciated.

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



Re: [google-appengine] Flushing async requests on development server for unit testing

2011-11-08 Thread Nick Johnson
Hi Lenny,

You should always wait for async requests to finish, including in
production. If you don't explicitly wait yourself, the appserver will wait
for them to complete before returning the response to the user anyway.

-Nick Johnson

On Wed, Nov 9, 2011 at 7:49 AM, Lenny Rachitsky  wrote:

> I'm finding that unit testing async based requests is rather tricky,
> as the put() often doesn't finish by the time the unit test is run. Is
> there any way to do a system-wide flush of all async requests on the
> development server? The only other solution I have is to add if branch
> that waits for the results to finish if it's on the dev server.
>
> Any advice would be much appreciated.
>
> --
> 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.
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine

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