diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-04-05 16:11:33 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-04-05 16:11:33 (GMT) |
commit | c824e9a713efac8d14e4d697f8c01a52c8f0d42c (patch) | |
tree | cb7952d83dc5148c688056d88dfd9a6cb46de655 | |
parent | 4f61b025203cf3fcd52eab2ece0d3f60b0bacd48 (diff) | |
download | cpython-c824e9a713efac8d14e4d697f8c01a52c8f0d42c.zip cpython-c824e9a713efac8d14e4d697f8c01a52c8f0d42c.tar.gz cpython-c824e9a713efac8d14e4d697f8c01a52c8f0d42c.tar.bz2 |
Try to fix sporadic test_multiprocessing failure
-rw-r--r-- | Lib/test/test_multiprocessing.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 1136ab2..3e467d5 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -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() # |