For ENG-5802, fix test bug where async tasks weren't shutting down