mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Increases some test timeouts to fix issue 11864.
This commit is contained in:
parent
b9c09878ab
commit
1ae2998f3e
1 changed files with 4 additions and 4 deletions
|
@ -260,14 +260,14 @@ class WaitTests(unittest.TestCase):
|
||||||
|
|
||||||
def test_timeout(self):
|
def test_timeout(self):
|
||||||
future1 = self.executor.submit(mul, 6, 7)
|
future1 = self.executor.submit(mul, 6, 7)
|
||||||
future2 = self.executor.submit(time.sleep, 3)
|
future2 = self.executor.submit(time.sleep, 6)
|
||||||
|
|
||||||
finished, pending = futures.wait(
|
finished, pending = futures.wait(
|
||||||
[CANCELLED_AND_NOTIFIED_FUTURE,
|
[CANCELLED_AND_NOTIFIED_FUTURE,
|
||||||
EXCEPTION_FUTURE,
|
EXCEPTION_FUTURE,
|
||||||
SUCCESSFUL_FUTURE,
|
SUCCESSFUL_FUTURE,
|
||||||
future1, future2],
|
future1, future2],
|
||||||
timeout=1.5,
|
timeout=5,
|
||||||
return_when=futures.ALL_COMPLETED)
|
return_when=futures.ALL_COMPLETED)
|
||||||
|
|
||||||
self.assertEqual(set([CANCELLED_AND_NOTIFIED_FUTURE,
|
self.assertEqual(set([CANCELLED_AND_NOTIFIED_FUTURE,
|
||||||
|
@ -357,8 +357,8 @@ class ExecutorTest(unittest.TestCase):
|
||||||
results = []
|
results = []
|
||||||
try:
|
try:
|
||||||
for i in self.executor.map(time.sleep,
|
for i in self.executor.map(time.sleep,
|
||||||
[0, 0, 3],
|
[0, 0, 6],
|
||||||
timeout=1.5):
|
timeout=5):
|
||||||
results.append(i)
|
results.append(i)
|
||||||
except futures.TimeoutError:
|
except futures.TimeoutError:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue