throws expected functions not called instead of timeout even if timeout is reset