[Python-checkins] bpo-33716, test_concurrent_futures: increase timeout (GH-7828) (GH-8264)
Victor Stinner
webhook-mailer at python.org
Thu Jul 12 05:11:35 EDT 2018
https://github.com/python/cpython/commit/8df4770e8d2c9ebd49c5e4d073eef3a5bc805cfc
commit: 8df4770e8d2c9ebd49c5e4d073eef3a5bc805cfc
branch: 3.6
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-07-12T11:11:29+02:00
summary:
bpo-33716, test_concurrent_futures: increase timeout (GH-7828) (GH-8264)
Increase the timeout from 1 min to 5 min.
Replace also time.time() with time.monotonic() for timeouts.
(cherry picked from commit 3ad8decd76c736f393755537aeb19b5612c21761)
files:
M Lib/test/test_concurrent_futures.py
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
index 5ddce09a08bc..1ce0c15512bf 100644
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -79,7 +79,7 @@ class ExecutorMixin:
def setUp(self):
super().setUp()
- self.t1 = time.time()
+ self.t1 = time.monotonic()
try:
self.executor = self.executor_type(max_workers=self.worker_count)
except NotImplementedError as e:
@@ -90,10 +90,10 @@ def tearDown(self):
self.executor.shutdown(wait=True)
self.executor = None
- dt = time.time() - self.t1
+ dt = time.monotonic() - self.t1
if test.support.verbose:
print("%.2fs" % dt, end=' ')
- self.assertLess(dt, 60, "synchronization issue: test lasted too long")
+ self.assertLess(dt, 300, "synchronization issue: test lasted too long")
super().tearDown()
More information about the Python-checkins
mailing list