add function WaitTimeout() and fix a exec test