]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Call listen() on low-level socket test.
authorBen Darnell <ben@bendarnell.com>
Sat, 19 Feb 2011 22:59:39 +0000 (14:59 -0800)
committerBen Darnell <ben@bendarnell.com>
Sat, 19 Feb 2011 22:59:39 +0000 (14:59 -0800)
This is apparently required on linux but not on mac.

tornado/test/simple_httpclient_test.py

index 7a66884d88d7c1b62eedc7c17ff69a4d79470e91..3dd08bd21a472cafdc9e84139a4eb217f8db53a1 100644 (file)
@@ -140,6 +140,7 @@ class SimpleHTTPClientTestCase(AsyncHTTPTestCase, LogTrapTestCase):
         with closing(socket.socket()) as sock:
             sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
             sock.bind(('', port))
+            sock.listen(1)
             self.http_client.fetch("http://localhost:%d/" % port,
                                    self.stop,
                                    connect_timeout=0.1)