[Python-checkins] r76844 - in python/branches/release31-maint: Lib/test/test_multiprocessing.py Misc/NEWS

r.david.murray python-checkins at python.org
Mon Dec 14 23:57:04 CET 2009


Author: r.david.murray
Date: Mon Dec 14 23:57:04 2009
New Revision: 76844

Log:
Merged revisions 76843 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r76843 | r.david.murray | 2009-12-14 17:45:15 -0500 (Mon, 14 Dec 2009) | 10 lines
  
  Merged revisions 76840 via svnmerge from 
  svn+ssh://pythondev@svn.python.org/python/trunk
  
  ........
    r76840 | r.david.murray | 2009-12-14 16:57:39 -0500 (Mon, 14 Dec 2009) | 3 lines
    
    Issue #7498: make test_multiprocessing use test_support.find_unused_port
    instead of a hard coded port number in test_rapid_restart.
  ........
................


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Lib/test/test_multiprocessing.py
   python/branches/release31-maint/Misc/NEWS

Modified: python/branches/release31-maint/Lib/test/test_multiprocessing.py
==============================================================================
--- python/branches/release31-maint/Lib/test/test_multiprocessing.py	(original)
+++ python/branches/release31-maint/Lib/test/test_multiprocessing.py	Mon Dec 14 23:57:04 2009
@@ -1213,8 +1213,9 @@
 
     def test_rapid_restart(self):
         authkey = os.urandom(32)
+        port = test.support.find_unused_port()
         manager = QueueManager(
-            address=('localhost', 9999), authkey=authkey, serializer=SERIALIZER)
+            address=('localhost', port), authkey=authkey, serializer=SERIALIZER)
         manager.start()
 
         p = self.Process(target=self._putter, args=(manager.address, authkey))
@@ -1224,7 +1225,7 @@
         del queue
         manager.shutdown()
         manager = QueueManager(
-            address=('localhost', 9999), authkey=authkey, serializer=SERIALIZER)
+            address=('localhost', port), authkey=authkey, serializer=SERIALIZER)
         manager.start()
         manager.shutdown()
 

Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS	(original)
+++ python/branches/release31-maint/Misc/NEWS	Mon Dec 14 23:57:04 2009
@@ -214,6 +214,9 @@
 Tests
 -----
 
+- Issue #7498: test_multiprocessing now uses test.support.find_unused_port
+  instead of a hardcoded port number in test_rapid_restart.
+
 - Issue #7431: use TESTFN in test_linecache instead of trying to create a 
   file in the Lib/test directory, which might be read-only for the
   user running the tests.


More information about the Python-checkins mailing list