mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Increase timeout used when waiting for manager to shutdown cleanly
before resorting to terminate()
This commit is contained in:
parent
0f52346e76
commit
3049f1243e
2 changed files with 6 additions and 1 deletions
|
@ -582,7 +582,7 @@ class BaseManager(object):
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
process.join(timeout=0.2)
|
process.join(timeout=1.0)
|
||||||
if process.is_alive():
|
if process.is_alive():
|
||||||
util.info('manager still alive')
|
util.info('manager still alive')
|
||||||
if hasattr(process, 'terminate'):
|
if hasattr(process, 'terminate'):
|
||||||
|
|
|
@ -1820,6 +1820,11 @@ class _TestZZZNumberOfObjects(BaseTestCase):
|
||||||
# run after all the other tests for the manager. It tests that
|
# run after all the other tests for the manager. It tests that
|
||||||
# there have been no "reference leaks" for the manager's shared
|
# there have been no "reference leaks" for the manager's shared
|
||||||
# objects. Note the comment in _TestPool.test_terminate().
|
# 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',)
|
ALLOWED_TYPES = ('manager',)
|
||||||
|
|
||||||
def test_number_of_objects(self):
|
def test_number_of_objects(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue