Can you move this into oae-test/lib/util as some kind of `drainTaskQueue` utility? Looks very useful.
We could probably run it before and after all the tests are finished as well.