summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2012-06-15 20:08:29 +0100
committerRichard Oudkerk <shibturn@gmail.com>2012-06-15 20:08:29 +0100
commita280214f8c3b722cb082c7265448ea2d92eefb46 (patch)
tree6dd6ba9cf7992ad08f329b1d104eb99a8fc599a8 /Lib
parentb9214d93027cf361966e0347930ca2e12d6fd81e (diff)
downloadcpython-a280214f8c3b722cb082c7265448ea2d92eefb46.tar.gz
Increase timeout used when waiting for manager to shutdown cleanly
before resorting to terminate()
Diffstat (limited to 'Lib')
-rw-r--r--Lib/multiprocessing/managers.py2
-rw-r--r--Lib/test/test_multiprocessing.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index cded4f39d5..f6611af9a6 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -582,7 +582,7 @@ class BaseManager(object):
except Exception:
pass
- process.join(timeout=0.2)
+ process.join(timeout=1.0)
if process.is_alive():
util.info('manager still alive')
if hasattr(process, 'terminate'):
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py
index e4031f6927..d79110abba 100644
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -1820,6 +1820,11 @@ class _TestZZZNumberOfObjects(BaseTestCase):
# run after all the other tests for the manager. It tests that
# there have been no "reference leaks" for the manager's shared
# objects. Note the comment in _TestPool.test_terminate().
+
+ # If some other test using ManagerMixin.manager fails, then the
+ # raised exception may keep alive a frame which holds a reference
+ # to a managed object. This will cause test_number_of_objects to
+ # also fail.
ALLOWED_TYPES = ('manager',)
def test_number_of_objects(self):