TEZ-1746. Flaky test in TestVertexImpl and TestExceptionPropagation. (zjffdu)

(cherry picked from commit 873b247bbdc930572d08b29aef84d8cb65d4c16d)