mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fixes a timing-related failure on Windows (issue 10183)
This commit is contained in:
parent
722b5fdbb8
commit
b304d0b46f
1 changed files with 3 additions and 3 deletions
|
@ -75,7 +75,7 @@ class Call(object):
|
||||||
|
|
||||||
def _wait_on_event(self, handle):
|
def _wait_on_event(self, handle):
|
||||||
if sys.platform.startswith('win'):
|
if sys.platform.startswith('win'):
|
||||||
r = ctypes.windll.kernel32.WaitForSingleObject(handle, 5 * 1000)
|
r = ctypes.windll.kernel32.WaitForSingleObject(handle, 60 * 1000)
|
||||||
assert r == 0
|
assert r == 0
|
||||||
else:
|
else:
|
||||||
self.CALL_LOCKS[handle].wait()
|
self.CALL_LOCKS[handle].wait()
|
||||||
|
@ -433,7 +433,7 @@ class WaitTests(unittest.TestCase):
|
||||||
EXCEPTION_FUTURE,
|
EXCEPTION_FUTURE,
|
||||||
SUCCESSFUL_FUTURE,
|
SUCCESSFUL_FUTURE,
|
||||||
future1, future2],
|
future1, future2],
|
||||||
timeout=1,
|
timeout=5,
|
||||||
return_when=futures.ALL_COMPLETED)
|
return_when=futures.ALL_COMPLETED)
|
||||||
|
|
||||||
self.assertEquals(set([CANCELLED_AND_NOTIFIED_FUTURE,
|
self.assertEquals(set([CANCELLED_AND_NOTIFIED_FUTURE,
|
||||||
|
@ -560,7 +560,7 @@ class ExecutorTest(unittest.TestCase):
|
||||||
try:
|
try:
|
||||||
for i in self.executor.map(timeout_call,
|
for i in self.executor.map(timeout_call,
|
||||||
[False, False, True],
|
[False, False, True],
|
||||||
timeout=1):
|
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