summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multiprocessing.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-12-14 22:45:15 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2009-12-14 22:45:15 (GMT)
commit8339623d120bfb6781e29ab1aca1ed9a10cff71e (patch)
tree13e9d928f65757795ad2e55eb655c695f11689ac /Lib/test/test_multiprocessing.py
parent77b338be20f29712c0774e7c2d36d7afb541e4b6 (diff)
downloadcpython-8339623d120bfb6781e29ab1aca1ed9a10cff71e.zip
cpython-8339623d120bfb6781e29ab1aca1ed9a10cff71e.tar.gz
cpython-8339623d120bfb6781e29ab1aca1ed9a10cff71e.tar.bz2
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. ........
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-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 eba02a9..66b2a2f 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -1213,8 +1213,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))
@@ -1224,7 +1225,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()