mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Issue #7498: make test_multiprocessing use test_support.find_unused_port
instead of a hard coded port number in test_rapid_restart.
This commit is contained in:
parent
0a0a1a842c
commit
c7298ff0fa
2 changed files with 12 additions and 2 deletions
|
|
@ -1212,8 +1212,9 @@ class _TestManagerRestart(BaseTestCase):
|
||||||
|
|
||||||
def test_rapid_restart(self):
|
def test_rapid_restart(self):
|
||||||
authkey = os.urandom(32)
|
authkey = os.urandom(32)
|
||||||
|
port = test_support.find_unused_port()
|
||||||
manager = QueueManager(
|
manager = QueueManager(
|
||||||
address=('localhost', 9999), authkey=authkey, serializer=SERIALIZER)
|
address=('localhost', port), authkey=authkey, serializer=SERIALIZER)
|
||||||
manager.start()
|
manager.start()
|
||||||
|
|
||||||
p = self.Process(target=self._putter, args=(manager.address, authkey))
|
p = self.Process(target=self._putter, args=(manager.address, authkey))
|
||||||
|
|
@ -1223,7 +1224,7 @@ class _TestManagerRestart(BaseTestCase):
|
||||||
del queue
|
del queue
|
||||||
manager.shutdown()
|
manager.shutdown()
|
||||||
manager = QueueManager(
|
manager = QueueManager(
|
||||||
address=('localhost', 9999), authkey=authkey, serializer=SERIALIZER)
|
address=('localhost', port), authkey=authkey, serializer=SERIALIZER)
|
||||||
manager.start()
|
manager.start()
|
||||||
manager.shutdown()
|
manager.shutdown()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ Core and Builtins
|
||||||
- Issue #7466: segmentation fault when the garbage collector is called
|
- Issue #7466: segmentation fault when the garbage collector is called
|
||||||
in the middle of populating a tuple. Patch by Florent Xicluna.
|
in the middle of populating a tuple. Patch by Florent Xicluna.
|
||||||
|
|
||||||
|
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
@ -42,6 +43,14 @@ Library
|
||||||
distutils.dist.DistributionMetadata.
|
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
|
What's New in Python 2.7 alpha 1
|
||||||
================================
|
================================
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue