mirror of
https://github.com/python/cpython.git
synced 2026-03-04 12:01:00 +00:00
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 3ad8decd76)
This commit is contained in:
parent
3b06285d2b
commit
8df4770e8d
1 changed files with 3 additions and 3 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue