mirror of
https://github.com/python/cpython.git
synced 2025-09-16 21:56:14 +00:00
Issue #8576: Remove use of find_unused_port() in test_smtplib and
test_multiprocessing. Patch by Paul Moore.
This commit is contained in:
parent
6d5e579cc5
commit
54f9f83e5c
3 changed files with 14 additions and 7 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue