This is a blast from the past.  There are now official tools for unit
testing deferred tasks:

http://code.google.com/appengine/docs/java/tools/localunittesting.html#Writing_Deferred_Task_Tests

However, ignore the latch stuff - it works erratically, and if you
have an even slightly complicated system it's hard to predict how many
tasks you expect ahead of time.  I just add a 1s delay for the tasks
to settle.

If you care about unit testing with task queues, please star these two issues:

http://code.google.com/p/googleappengine/issues/detail?id=6818
http://code.google.com/p/googleappengine/issues/detail?id=6819

Jeff

On Thu, Feb 2, 2012 at 3:20 PM, Riley Eynon-Lynch <rileyl...@gmail.com> wrote:
> private QueueStateInfo getQueue(String queueName) {
>     return
> LocalTaskQueueTestConfig.getLocalTaskQueue().getQueueStateInfo().get(queueName);
> }
>
> will do.  Thanks again!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine-java/-/r3vJS5G9gkAJ.
>
> To post to this group, send email to google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.

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

Reply via email to