summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-02-10 18:17:46 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-02-10 18:17:46 (GMT)
commitcf736f4e98f87e4a9006eb641723f7bad57edb42 (patch)
treea20a630a443d843b078c9f837705a600253d5aa1
parent580e007860e0142c9ea0eabec49560ca515e8476 (diff)
downloadcpython-cf736f4e98f87e4a9006eb641723f7bad57edb42.zip
cpython-cf736f4e98f87e4a9006eb641723f7bad57edb42.tar.gz
cpython-cf736f4e98f87e4a9006eb641723f7bad57edb42.tar.bz2
Issue #20505: Use even shorter sleep in test_timeout_rounding() to make the
test more reliable (= fail more often on Windows with HPET enabled).
-rw-r--r--Lib/test/test_asyncio/test_events.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index e6a1c97..2a01b1c 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -1176,13 +1176,15 @@ class EventLoopTestsMixin:
loop = self.loop
yield from asyncio.sleep(1e-2, loop=loop)
yield from asyncio.sleep(1e-4, loop=loop)
+ yield from asyncio.sleep(1e-6, loop=loop)
+ yield from asyncio.sleep(1e-8, loop=loop)
self.loop.run_until_complete(wait())
- # The ideal number of call is 6, but on some platforms, the selector
+ # The ideal number of call is 10, but on some platforms, the selector
# may sleep at little bit less than timeout depending on the resolution
- # of the clock used by the kernel. Tolerate 2 useless calls on these
+ # of the clock used by the kernel. Tolerate 5 useless calls on these
# platforms.
- self.assertLessEqual(self.loop._run_once_counter, 8,
+ self.assertLessEqual(self.loop._run_once_counter, 15,
{'time_info': time.get_clock_info('time'),
'monotonic_info': time.get_clock_info('monotonic'),
'selector': self.loop._selector.__class__.__name__})