Change test to avoid shutting down the event loop before all blocking operations return.