summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-09-24 12:19:48 (GMT)
committerGitHub <noreply@github.com>2019-09-24 12:19:48 (GMT)
commitb0e1ae5f5430433766e023c1a6936aeba0f2b84e (patch)
tree4d0df52cd13a76b4a6652963e256541552cc28c9 /Lib
parent99799c722065d0524f3ab0bc455e1938bb8dc60f (diff)
downloadcpython-b0e1ae5f5430433766e023c1a6936aeba0f2b84e.zip
cpython-b0e1ae5f5430433766e023c1a6936aeba0f2b84e.tar.gz
cpython-b0e1ae5f5430433766e023c1a6936aeba0f2b84e.tar.bz2
bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)
Multiprocessing test test_mymanager() now also expects -SIGTERM, not only exitcode 0. bpo-30356: BaseManager._finalize_manager() sends SIGTERM to the manager process if it takes longer than 1 second to stop, which happens on slow buildbots.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/_test_multiprocessing.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index b720a48..bfaa02b 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -2799,16 +2799,17 @@ class _TestMyManager(BaseTestCase):
self.common(manager)
manager.shutdown()
- # If the manager process exited cleanly then the exitcode
- # will be zero. Otherwise (after a short timeout)
- # terminate() is used, resulting in an exitcode of -SIGTERM.
- self.assertEqual(manager._process.exitcode, 0)
+ # bpo-30356: BaseManager._finalize_manager() sends SIGTERM
+ # to the manager process if it takes longer than 1 second to stop,
+ # which happens on slow buildbots.
+ self.assertIn(manager._process.exitcode, (0, -signal.SIGTERM))
def test_mymanager_context(self):
with MyManager() as manager:
self.common(manager)
# bpo-30356: BaseManager._finalize_manager() sends SIGTERM
- # to the manager process if it takes longer than 1 second to stop.
+ # to the manager process if it takes longer than 1 second to stop,
+ # which happens on slow buildbots.
self.assertIn(manager._process.exitcode, (0, -signal.SIGTERM))
def test_mymanager_context_prestarted(self):