diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-06-27 09:22:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-27 09:22:43 (GMT) |
commit | 8eac0b8ed56115a1aa315f171b61e7164c6fbeb4 (patch) | |
tree | 15069d49d7c5be1e52ec37a2afea91764efafc51 | |
parent | 0eaf7b975bd61169a8d78945d2d12f23299f61a8 (diff) | |
download | cpython-8eac0b8ed56115a1aa315f171b61e7164c6fbeb4.zip cpython-8eac0b8ed56115a1aa315f171b61e7164c6fbeb4.tar.gz cpython-8eac0b8ed56115a1aa315f171b61e7164c6fbeb4.tar.bz2 |
bpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)
Tolerate a different of 50 ms, instead of just 30 ms, in
test_timeout() of multiprocessing tests. This change should fix such
test failure on Windows:
FAIL: test_timeout (test.test_multiprocessing_spawn.WithProcessesTestQueue)
Traceback (most recent call last):
File "lib\test\_test_multiprocessing.py", line 753, in test_timeout
self.assertGreaterEqual(delta, 0.170)
AssertionError: 0.16138982772827148 not greater than or equal to 0.17
(cherry picked from commit f15f66d275d1166839312c9ff3a67c00b486c7d6)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 4ae5f97..7e90316 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -1035,9 +1035,9 @@ class _TestQueue(BaseTestCase): start = time.time() self.assertRaises(pyqueue.Empty, q.get, True, 0.200) delta = time.time() - start - # Tolerate a delta of 30 ms because of the bad clock resolution on + # Tolerate a delta of 50 ms because of the bad clock resolution on # Windows (usually 15.6 ms) - self.assertGreaterEqual(delta, 0.170) + self.assertGreaterEqual(delta, 0.150) close_queue(q) def test_queue_feeder_donot_stop_onexc(self): |