add test cases. when raise timeout/socket_error.