[Python-checkins] cpython: Relax some asyncio test timeouts (http://bugs.python.org/issue19285).

guido.van.rossum python-checkins at python.org
Sat Oct 19 00:17:37 CEST 2013


http://hg.python.org/cpython/rev/e042deeeb703
changeset:   86453:e042deeeb703
user:        Guido van Rossum <guido at dropbox.com>
date:        Fri Oct 18 15:15:56 2013 -0700
summary:
  Relax some asyncio test timeouts (http://bugs.python.org/issue19285).

files:
  Lib/test/test_asyncio/test_base_events.py |  2 +-
  Lib/test/test_asyncio/test_events.py      |  8 ++++----
  2 files changed, 5 insertions(+), 5 deletions(-)


diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -121,7 +121,7 @@
         t0 = self.loop.time()
         self.loop.run_forever()
         t1 = self.loop.time()
-        self.assertTrue(0.09 <= t1-t0 <= 0.12, t1-t0)
+        self.assertTrue(0.09 <= t1-t0 <= 0.9, t1-t0)
 
     def test_run_once_in_executor_handle(self):
         def cb():
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -215,7 +215,7 @@
         t0 = self.loop.time()
         self.loop.run_until_complete(tasks.sleep(0.1, loop=self.loop))
         t1 = self.loop.time()
-        self.assertTrue(0.08 <= t1-t0 <= 0.12, t1-t0)
+        self.assertTrue(0.08 <= t1-t0 <= 0.8, t1-t0)
 
     def test_run_until_complete_stopped(self):
         @tasks.coroutine
@@ -238,7 +238,7 @@
         self.loop.run_forever()
         t1 = time.monotonic()
         self.assertEqual(results, ['hello world'])
-        self.assertTrue(0.08 <= t1-t0 <= 0.2, t1-t0)
+        self.assertTrue(0.08 <= t1-t0 <= 0.8, t1-t0)
 
     def test_call_soon(self):
         results = []
@@ -462,8 +462,8 @@
 
         self.loop.add_signal_handler(signal.SIGALRM, my_handler, *some_args)
 
-        signal.setitimer(signal.ITIMER_REAL, 0.01, 0)  # Send SIGALRM once.
-        self.loop.call_later(0.015, self.loop.stop)
+        signal.setitimer(signal.ITIMER_REAL, 0.1, 0)  # Send SIGALRM once.
+        self.loop.call_later(0.5, self.loop.stop)
         self.loop.run_forever()
         self.assertEqual(caught, 1)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list