add method for wait for task error test