]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Remove test_connect_timeout, which was only passing before due to a bug
authorBen Darnell <ben@bendarnell.com>
Sat, 3 Sep 2011 19:20:43 +0000 (12:20 -0700)
committerBen Darnell <ben@bendarnell.com>
Sat, 3 Sep 2011 19:20:43 +0000 (12:20 -0700)
in the timeout implementation.

tornado/test/simple_httpclient_test.py

index 6c5d710ca1416423585bc281a86feb5ebf26f5fc..3ba14bf386464befabed6cefe673ba07feef2f08 100644 (file)
@@ -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)