]> granicus.if.org Git - python/commitdiff
Relax test timing (bpo-29861) to avoid sporadic failures (#1120) (#1133)
authorAntoine Pitrou <pitrou@free.fr>
Fri, 14 Apr 2017 11:45:27 +0000 (13:45 +0200)
committerGitHub <noreply@github.com>
Fri, 14 Apr 2017 11:45:27 +0000 (13:45 +0200)
(cherry picked from commit 685cdb9acc3fca04a9897d88b89771ddfd50e772)

Lib/test/_test_multiprocessing.py

index d1ef98dab4733275afc24bca53d6501aa865c1f9..e41845b404307e96a5828486729c4e86edb28abf 100644 (file)
@@ -1990,6 +1990,7 @@ class _TestPool(BaseTestCase):
         self.pool.map(identity, objs)
 
         del objs
+        time.sleep(DELTA)  # let threaded cleanup code run
         self.assertEqual(set(wr() for wr in refs), {None})
         # With a process pool, copies of the objects are returned, check
         # they were released too.