Shutdown the event loop after the request when unit testing.