Merge "Call tearDown before reportLogs + invocationEnded."