[Python-checkins] bpo-30317: Fix multiprocessing test_timeout() (GH-8621)

Miss Islington (bot) webhook-mailer at python.org
Thu Aug 2 20:27:01 EDT 2018


https://github.com/python/cpython/commit/50d78677899d315c17dc9a14d2f94a013046c71a
commit: 50d78677899d315c17dc9a14d2f94a013046c71a
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-08-02T17:26:57-07:00
summary:

bpo-30317: Fix multiprocessing test_timeout() (GH-8621)


Multiprocessing test_timeout() now accepts a delta of 100 ms instead
of just 50 ms, since the test failed with 135.8 ms instead of the
expected 200 ms.
(cherry picked from commit 5640d030e100aade54210034828b711c3b506b18)

Co-authored-by: Victor Stinner <vstinner at redhat.com>

files:
M Lib/test/_test_multiprocessing.py

diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index a3891f1f04f5..2ece58b305d3 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -1039,9 +1039,10 @@ def test_timeout(self):
         start = time.time()
         self.assertRaises(pyqueue.Empty, q.get, True, 0.200)
         delta = time.time() - start
-        # Tolerate a delta of 50 ms because of the bad clock resolution on
-        # Windows (usually 15.6 ms)
-        self.assertGreaterEqual(delta, 0.150)
+        # bpo-30317: Tolerate a delta of 100 ms because of the bad clock
+        # resolution on Windows (usually 15.6 ms). x86 Windows7 3.x once
+        # failed because the delta was only 135.8 ms.
+        self.assertGreaterEqual(delta, 0.100)
         close_queue(q)
 
     def test_queue_feeder_donot_stop_onexc(self):



More information about the Python-checkins mailing list