Permalink
Browse files

Just skip all timing-sensitive tests on travis-ci.

  • Loading branch information...
1 parent d2a9b85 commit abc5780a06a1edd0177a399a4dd4f39497cb0c57 @bdarnell bdarnell committed Mar 10, 2013
Showing with 12 additions and 3 deletions.
  1. +2 −1 tornado/test/gen_test.py
  2. +3 −1 tornado/test/ioloop_test.py
  3. +2 −1 tornado/test/simple_httpclient_test.py
  4. +5 −0 tornado/test/util.py
@@ -12,7 +12,7 @@
from tornado.log import app_log
from tornado import stack_context
from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, ExpectLog, gen_test
-from tornado.test.util import unittest
+from tornado.test.util import unittest, skipOnTravis
from tornado.web import Application, RequestHandler, asynchronous
from tornado import gen
@@ -250,6 +250,7 @@ def f():
self.stop()
self.run_gen(f)
+ @skipOnTravis
@gen_test
def test_multi_performance(self):
# Yielding a list used to have quadratic performance; make
@@ -14,7 +14,7 @@
from tornado.ioloop import IOLoop, TimeoutError
from tornado.stack_context import ExceptionStackContext, StackContext, wrap, NullContext
from tornado.testing import AsyncTestCase, bind_unused_port
-from tornado.test.util import unittest, skipIfNonUnix
+from tornado.test.util import unittest, skipIfNonUnix, skipOnTravis
try:
from concurrent import futures
@@ -23,6 +23,7 @@
class TestIOLoop(AsyncTestCase):
+ @skipOnTravis
def test_add_callback_wakeup(self):
# Make sure that add_callback from inside a running IOLoop
# wakes up the IOLoop immediately instead of waiting for a timeout.
@@ -40,6 +41,7 @@ def schedule_callback():
self.assertAlmostEqual(time.time(), self.start_time, places=2)
self.assertTrue(self.called)
+ @skipOnTravis
def test_add_callback_wakeup_other_thread(self):
def target():
# sleep a bit to let the ioloop go into its poll loop
@@ -18,7 +18,7 @@
from tornado.test.httpclient_test import ChunkHandler, CountdownHandler, HelloWorldHandler
from tornado.test import httpclient_test
from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, bind_unused_port, ExpectLog
-from tornado.test.util import unittest
+from tornado.test.util import unittest, skipOnTravis
from tornado.web import RequestHandler, Application, asynchronous, url
@@ -209,6 +209,7 @@ def test_see_other_redirect(self):
# request is the original request, is a POST still
self.assertEqual("POST", response.request.method)
+ @skipOnTravis
def test_request_timeout(self):
with ExpectLog(gen_log, "uncaught exception"):
response = self.fetch('/trigger?wake=false', request_timeout=0.1)
@@ -12,3 +12,8 @@
skipIfNonUnix = unittest.skipIf(os.name != 'posix' or sys.platform == 'cygwin',
"non-unix platform")
+
+# travis-ci.org runs our tests in an overworked virtual machine, which makes
+# timing-related tests unreliable.
+skipOnTravis = unittest.skipIf('TRAVIS' in os.environ,
+ 'timing tests unreliable on travis')

0 comments on commit abc5780

Please sign in to comment.