mirror of
https://github.com/python/cpython.git
synced 2024-11-24 18:34:43 +08:00
Try to fix sporadic test_multiprocessing failure
This commit is contained in:
parent
4f61b02520
commit
c824e9a713
@ -12,6 +12,7 @@ import io
|
||||
import sys
|
||||
import os
|
||||
import gc
|
||||
import errno
|
||||
import signal
|
||||
import array
|
||||
import socket
|
||||
@ -1277,7 +1278,16 @@ class _TestManagerRestart(BaseTestCase):
|
||||
manager.shutdown()
|
||||
manager = QueueManager(
|
||||
address=addr, authkey=authkey, serializer=SERIALIZER)
|
||||
manager.start()
|
||||
try:
|
||||
manager.start()
|
||||
except IOError as e:
|
||||
if e.errno != errno.EADDRINUSE:
|
||||
raise
|
||||
# Retry after some time, in case the old socket was lingering
|
||||
# (sporadic failure on buildbots)
|
||||
time.sleep(1.0)
|
||||
manager = QueueManager(
|
||||
address=addr, authkey=authkey, serializer=SERIALIZER)
|
||||
manager.shutdown()
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user