SPARK-3179. Add task OutputMetrics.

Yeah, I had this same thought, but I can't think of any good way to prevent this.  Note that the other tests in this class have the same problem.