Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit46f6c56

Browse files
bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)
Multiprocessing test test_mymanager() now also expects -SIGTERM, notonly exitcode 0.bpo-30356: BaseManager._finalize_manager() sends SIGTERM to themanager process if it takes longer than 1 second to stop, whichhappens on slow buildbots.(cherry picked from commitb0e1ae5)Co-authored-by: Victor Stinner <vstinner@redhat.com>
1 parentc13a4d6 commit46f6c56

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

‎Lib/test/_test_multiprocessing.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2689,16 +2689,17 @@ def test_mymanager(self):
26892689
self.common(manager)
26902690
manager.shutdown()
26912691

2692-
#If the manager process exited cleanly then the exitcode
2693-
#will be zero. Otherwise (after a short timeout)
2694-
#terminate() is used, resulting in an exitcode of -SIGTERM.
2695-
self.assertEqual(manager._process.exitcode,0)
2692+
#bpo-30356: BaseManager._finalize_manager() sends SIGTERM
2693+
#to the manager process if it takes longer than 1 second to stop,
2694+
#which happens on slow buildbots.
2695+
self.assertIn(manager._process.exitcode,(0,-signal.SIGTERM))
26962696

26972697
deftest_mymanager_context(self):
26982698
withMyManager()asmanager:
26992699
self.common(manager)
27002700
# bpo-30356: BaseManager._finalize_manager() sends SIGTERM
2701-
# to the manager process if it takes longer than 1 second to stop.
2701+
# to the manager process if it takes longer than 1 second to stop,
2702+
# which happens on slow buildbots.
27022703
self.assertIn(manager._process.exitcode, (0,-signal.SIGTERM))
27032704

27042705
deftest_mymanager_context_prestarted(self):
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Multiprocessing test test_mymanager() now also expects -SIGTERM, not only
2+
exitcode 0. BaseManager._finalize_manager() sends SIGTERM to the manager
3+
process if it takes longer than 1 second to stop, which happens on slow
4+
buildbots.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp