summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-12-14 21:57:39 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2009-12-14 21:57:39 (GMT)
commitc7298ff0fa9a4b667f206733d591966729c87337 (patch)
treec3ca3d8a9513f2e76a20e65f1ddec24c1ef1bc77 /Lib/test
parent0a0a1a842c02c87fcb052dec226f591cfe6f988f (diff)
downloadcpython-c7298ff0fa9a4b667f206733d591966729c87337.zip
cpython-c7298ff0fa9a4b667f206733d591966729c87337.tar.gz
cpython-c7298ff0fa9a4b667f206733d591966729c87337.tar.bz2
Issue #7498: make test_multiprocessing use test_support.find_unused_port
instead of a hard coded port number in test_rapid_restart.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_multiprocessing.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index 6efeb69..b6c6a84 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -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()