summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multiprocessing.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-04-30 23:08:48 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-04-30 23:08:48 (GMT)
commit54f9f83e5cd417267b29a38f3364716523e69b28 (patch)
tree8dad7d5d01197c4f05b7f1ba8c15f493433addd6 /Lib/test/test_multiprocessing.py
parent6d5e579cc5e349fe7e8185a821434d718db2c6ea (diff)
downloadcpython-54f9f83e5cd417267b29a38f3364716523e69b28.zip
cpython-54f9f83e5cd417267b29a38f3364716523e69b28.tar.gz
cpython-54f9f83e5cd417267b29a38f3364716523e69b28.tar.bz2
Issue #8576: Remove use of find_unused_port() in test_smtplib and
test_multiprocessing. Patch by Paul Moore.
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r--Lib/test/test_multiprocessing.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index 03629d1..59b3357 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -1262,9 +1262,9 @@ class _TestManagerRestart(BaseTestCase):
def test_rapid_restart(self):
authkey = os.urandom(32)
- port = test_support.find_unused_port()
manager = QueueManager(
- address=('localhost', port), authkey=authkey, serializer=SERIALIZER)
+ address=('localhost', 0), authkey=authkey, serializer=SERIALIZER)
+ addr = manager.get_server().address
manager.start()
p = self.Process(target=self._putter, args=(manager.address, authkey))
@@ -1274,7 +1274,7 @@ class _TestManagerRestart(BaseTestCase):
del queue
manager.shutdown()
manager = QueueManager(
- address=('localhost', port), authkey=authkey, serializer=SERIALIZER)
+ address=addr, authkey=authkey, serializer=SERIALIZER)
manager.start()
manager.shutdown()