add the support for testing the random failure

duplicate to **taskStopChan**