]> granicus.if.org Git - python/commitdiff
bpo-31069, test_multiprocessing: Fix dangling process (#3103) (#3105)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 16 Aug 2017 11:14:40 +0000 (13:14 +0200)
committerGitHub <noreply@github.com>
Wed, 16 Aug 2017 11:14:40 +0000 (13:14 +0200)
Fix a warning about dangling processes in test_rapid_restart() of
_test_multiprocessing: join the process.
(cherry picked from commit 17657bb9458ff8f8804b7637d61686a68f4b9471)

Lib/test/test_multiprocessing.py

index 69bd8f79a85568895bf93970787f4b553e4adbc0..a77bfee6718ee66afab33b28e0c69b64dfd0340c 100644 (file)
@@ -1583,12 +1583,13 @@ class _TestManagerRestart(BaseTestCase):
         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)
         manager.start()