10000 bpo-33716, test_concurrent_futures: increase timeout (GH-7828) (GH-8264) · python/cpython@8df4770 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8df4770

Browse files
authored
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 3ad8dec)
1 parent 3b06285 commit 8df4770

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_concurrent_futures.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class ExecutorMixin:
7979
def setUp(self):
8080
super().setUp()
8181

82-
self.t1 = time.time()
82+
self.t1 = time.monotonic()
8383
try:
8484
self.executor = self.executor_type(max_workers=self.worker_count)
8585
except NotImplementedError as e:
@@ -90,10 +90,10 @@ def tearDown(self):
9090
self.executor.shutdown(wait=True)
9191
self.executor = None
9292

93-
dt = time.time() - self.t1
93+
dt = time.monotonic() - self.t1
9494
if test.support.verbose:
9595
print("%.2fs" % dt, end=' ')
96-
self.assertLess(dt, 60, "synchronization issue: test lasted too long")
96+
self.assertLess(dt, 300, "synchronization issue: test lasted too long")
9797

9898
super().tearDown()
9999

0 commit comments

Comments
 (0)
0