]> granicus.if.org Git - python/commitdiff
Issue #7498: make test_multiprocessing use test_support.find_unused_port
authorR. David Murray <rdmurray@bitdance.com>
Mon, 14 Dec 2009 21:57:39 +0000 (21:57 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Mon, 14 Dec 2009 21:57:39 +0000 (21:57 +0000)
instead of a hard coded port number in test_rapid_restart.

Lib/test/test_multiprocessing.py
Misc/NEWS

index 6efeb69b5dc92a92460d647c9705c1ed828f5634..b6c6a844b0ab4a1a86062e74d89f18d1f9125595 100644 (file)
@@ -1212,8 +1212,9 @@ class _TestManagerRestart(BaseTestCase):
 
     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))
@@ -1223,7 +1224,7 @@ class _TestManagerRestart(BaseTestCase):
         del queue
         manager.shutdown()
         manager = QueueManager(
-            address=('localhost', 9999), authkey=authkey, serializer=SERIALIZER)
+            address=('localhost', port), authkey=authkey, serializer=SERIALIZER)
         manager.start()
         manager.shutdown()
 
index 08369a2e783dc998a719db97da726526fb8dcd84..53905e4fa3df9c257c4242543284b18f3d586d56 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -20,6 +20,7 @@ Core and Builtins
 - Issue #7466: segmentation fault when the garbage collector is called
   in the middle of populating a tuple.  Patch by Florent Xicluna.
 
+
 Library
 -------
 
@@ -42,6 +43,14 @@ Library
   distutils.dist.DistributionMetadata.
 
 
+Tests
+-----
+
+- Issue #7498: test_multiprocessing now uses test_support.find_unused_port
+  instead of a hardcoded port number in test_rapid_restart.
+
+
+
 What's New in Python 2.7 alpha 1
 ================================