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:
R. David Murray 2009-12-14 21:57:39 +00:00
parent 0a0a1a842c
commit c7298ff0fa
2 changed files with 12 additions and 2 deletions

View file

@ -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()