[Python-checkins] bpo-31069, test_multiprocessing: Fix dangling process (#3103)

Victor Stinner webhook-mailer at python.org
Wed Aug 16 06:46:07 EDT 2017


https://github.com/python/cpython/commit/17657bb9458ff8f8804b7637d61686a68f4b9471
commit: 17657bb9458ff8f8804b7637d61686a68f4b9471
branch: master
author: Victor Stinner <victor.stinner at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-08-16T12:46:04+02:00
summary:

bpo-31069, test_multiprocessing: Fix dangling process (#3103)

Fix a warning about dangling processes in test_rapid_restart() of
_test_multiprocessing: join the process.

files:
M Lib/test/_test_multiprocessing.py

diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index cce3c0287e9..dce62df1d02 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -2596,12 +2596,13 @@ def test_rapid_restart(self):
         manager.start()
 
         p = self.Process(target=self._putter, args=(manager.address, authkey))
-        p.daemon = True
         p.start()
+        p.join()
         queue = manager.get_queue()
         self.assertEqual(queue.get(), 'hello world')
         del queue
         manager.shutdown()
+
         manager = QueueManager(
             address=addr, authkey=authkey, serializer=SERIALIZER)
         try:



More information about the Python-checkins mailing list