]> granicus.if.org Git - python/commitdiff
bpo-31069, test_multiprocessing: Fix dangling process (#3103)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 16 Aug 2017 10:46:04 +0000 (12:46 +0200)
committerGitHub <noreply@github.com>
Wed, 16 Aug 2017 10:46:04 +0000 (12:46 +0200)
Fix a warning about dangling processes in test_rapid_restart() of
_test_multiprocessing: join the process.

Lib/test/_test_multiprocessing.py

index cce3c0287e96aa32eac396832b8b303701f8e76e..dce62df1d0234914c63b60df25ab77310b01503b 100644 (file)
@@ -2596,12 +2596,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)
         try: