From: Ben Darnell Date: Sat, 3 Sep 2011 19:20:43 +0000 (-0700) Subject: Remove test_connect_timeout, which was only passing before due to a bug X-Git-Tag: v2.1.0~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86e4c5f5995c2d7f1add13ba4ba6fe11e4a1764e;p=thirdparty%2Ftornado.git Remove test_connect_timeout, which was only passing before due to a bug in the timeout implementation. --- diff --git a/tornado/test/simple_httpclient_test.py b/tornado/test/simple_httpclient_test.py index 6c5d710ca..3ba14bf38 100644 --- a/tornado/test/simple_httpclient_test.py +++ b/tornado/test/simple_httpclient_test.py @@ -135,24 +135,6 @@ class SimpleHTTPClientTestCase(AsyncHTTPTestCase, LogTrapTestCase): self.assertTrue(response.effective_url.endswith("/countdown/2")) self.assertTrue(response.headers["Location"].endswith("/countdown/1")) - def test_connect_timeout(self): - # create a socket and bind it to a port, but don't - # call accept so the connection will timeout. - #get_unused_port() - port = get_unused_port() - - with closing(socket.socket()) as sock: - sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - sock.bind(('127.0.0.1', port)) - sock.listen(1) - self.http_client.fetch("http://localhost:%d/" % port, - self.stop, - connect_timeout=0.1) - response = self.wait() - self.assertEqual(response.code, 599) - self.assertEqual(int(response.request_time * 10), 1) - self.assertEqual(str(response.error), "HTTP 599: Timeout") - def test_request_timeout(self): response = self.fetch('/hang', request_timeout=0.1) self.assertEqual(response.code, 599)