]> granicus.if.org Git - python/commitdiff
Increase timeout used when waiting for manager to shutdown cleanly
authorRichard Oudkerk <shibturn@gmail.com>
Fri, 15 Jun 2012 19:08:29 +0000 (20:08 +0100)
committerRichard Oudkerk <shibturn@gmail.com>
Fri, 15 Jun 2012 19:08:29 +0000 (20:08 +0100)
before resorting to terminate()

Lib/multiprocessing/managers.py
Lib/test/test_multiprocessing.py

index cded4f39d5c81e4691e22d9230e353159263431f..f6611af9a6cb67d674539081facceac59854c905 100644 (file)
@@ -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'):
index e4031f6927756496c9233adb2fa91aead9976862..d79110abbacbe61f1ff45895b4b98252d401b4fc 100644 (file)
@@ -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):