]> granicus.if.org Git - python/commitdiff
Issue #4397. Fix occasional test_socket failure on OS X.
authorMark Dickinson <dickinsm@gmail.com>
Thu, 15 Jan 2009 14:54:37 +0000 (14:54 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Thu, 15 Jan 2009 14:54:37 +0000 (14:54 +0000)
Lib/test/test_socket.py
Misc/NEWS

index 1287dd102c3f5fd645f8f52b2c498ec43bbd3878..eaf9bcba196de5efb647703c3c09f96dee157b8d 100644 (file)
@@ -584,6 +584,10 @@ class BasicTCPTest(SocketConnectedTest):
         # Testing shutdown()
         msg = self.cli_conn.recv(1024)
         self.assertEqual(msg, MSG)
+        # wait for _testShutdown to finish: on OS X, when the server
+        # closes the connection the client also becomes disconnected,
+        # and the client's shutdown call will fail. (Issue #4937.)
+        self.done.wait()
 
     def _testShutdown(self):
         self.serv_conn.send(MSG)
index 9ced73d54d09038af8dcd61c0e53cd8de41a0641..96d40a9381fa216c184850a0407073851ef35f5e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -357,6 +357,8 @@ C-API
 Extension Modules
 -----------------
 
+- Issue #4937: Fix occasional test_socket failure on OS X.
+
 - Issue #4279: Fix build of parsermodule under Cygwin.
 
 - Issue #4051: Prevent conflict of UNICODE macros in cPickle.