]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
test: Remove skipOnTravis
authorBen Darnell <ben@bendarnell.com>
Thu, 11 Jul 2024 19:21:09 +0000 (15:21 -0400)
committerBen Darnell <ben@bendarnell.com>
Thu, 11 Jul 2024 19:21:09 +0000 (15:21 -0400)
We haven't used Travis for CI in a long time, and our current CI
system is much less overloaded so these timing-sensitive tests are
no longer flaky.

tornado/test/gen_test.py
tornado/test/httpclient_test.py
tornado/test/httpserver_test.py
tornado/test/ioloop_test.py
tornado/test/netutil_test.py
tornado/test/simple_httpclient_test.py
tornado/test/tcpclient_test.py
tornado/test/util.py

index 87f6ab7fa497aa48e0b0bd9850dce0fd25992a25..1a365dbd72171fc7ce686978e6396f007b62d67f 100644 (file)
@@ -11,7 +11,7 @@ import unittest
 from tornado.concurrent import Future
 from tornado.log import app_log
 from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, ExpectLog, gen_test
-from tornado.test.util import skipOnTravis, skipNotCPython
+from tornado.test.util import skipNotCPython
 from tornado.web import Application, RequestHandler, HTTPError
 
 from tornado import gen
@@ -139,7 +139,6 @@ class GenBasicTest(AsyncTestCase):
 
         self.io_loop.run_sync(f)
 
-    @skipOnTravis
     @gen_test
     def test_multi_performance(self):
         # Yielding a list used to have quadratic performance; make
index 40a29d0b9ebee62c4ae0d97166b73035c155ef69..f6e7dbbe7f0cd07c17aceb4dec833c0de33acf98 100644 (file)
@@ -28,7 +28,7 @@ from tornado.iostream import IOStream
 from tornado.log import gen_log, app_log
 from tornado import netutil
 from tornado.testing import AsyncHTTPTestCase, bind_unused_port, gen_test, ExpectLog
-from tornado.test.util import skipOnTravis, ignore_deprecation
+from tornado.test.util import ignore_deprecation
 from tornado.web import Application, RequestHandler, url
 from tornado.httputil import format_timestamp, HTTPHeaders
 
@@ -191,7 +191,6 @@ class HTTPClientCommonTestCase(AsyncHTTPTestCase):
         self.assertEqual(response.code, 200)
         self.assertEqual(response.body, body)
 
-    @skipOnTravis
     def test_hello_world(self):
         response = self.fetch("/hello")
         self.assertEqual(response.code, 200)
index 3a90440dfc218cb1480c906101bef1e4add206b7..7b411ed6e4f98abdc501aee76f7851f4c7fbafc9 100644 (file)
@@ -27,7 +27,7 @@ from tornado.testing import (
     ExpectLog,
     gen_test,
 )
-from tornado.test.util import skipOnTravis, abstract_base_test
+from tornado.test.util import abstract_base_test
 from tornado.web import Application, RequestHandler, stream_request_body
 
 from contextlib import closing
@@ -1267,7 +1267,6 @@ class MaxHeaderSizeTest(AsyncHTTPTestCase):
                     self.assertIn(e.response.code, (431, 599))
 
 
-@skipOnTravis
 class IdleTimeoutTest(AsyncHTTPTestCase):
     def get_app(self):
         return Application([("/", HelloWorldRequestHandler)])
index 212393928323d849194efdee4660819fa31850a0..047b3614eb3073aed8d4f19cf3ce47ca847c4a7a 100644 (file)
@@ -28,7 +28,6 @@ from tornado.testing import (
 from tornado.test.util import (
     ignore_deprecation,
     skipIfNonUnix,
-    skipOnTravis,
 )
 from tornado.concurrent import Future
 
@@ -58,7 +57,6 @@ class TestIOLoop(AsyncTestCase):
         loop.start()
         self.assertLess(self.calls, 10)
 
-    @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.
@@ -77,7 +75,6 @@ class TestIOLoop(AsyncTestCase):
         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
index ef82cba85f8c2a466290df79c687f18bdc666db7..2334727873bd23f11e06f59bc9ba671501dd3f69 100644 (file)
@@ -188,8 +188,6 @@ class IsValidIPTest(unittest.TestCase):
 
 class TestPortAllocation(unittest.TestCase):
     def test_same_port_allocation(self):
-        if "TRAVIS" in os.environ:
-            self.skipTest("dual-stack servers often have port conflicts on travis")
         sockets = bind_sockets(0, "localhost")
         try:
             port = sockets[0].getsockname()[1]
index 07f04ae938cde4364913455e88926893faf2b974..c1cff83c9ad6d7f9be31ff8ae71543ec2f3dcf8b 100644 (file)
@@ -41,7 +41,6 @@ from tornado.testing import (
 )
 from tornado.test.util import (
     abstract_base_test,
-    skipOnTravis,
     skipIfNoIPv6,
     refusing_port,
 )
@@ -288,7 +287,6 @@ class SimpleHTTPClientTestMixin(AsyncTestCase):
             # request is the original request, is a POST still
             self.assertEqual("POST", response.request.method)
 
-    @skipOnTravis
     @gen_test
     def test_connect_timeout(self):
         timeout = 0.1
@@ -317,7 +315,6 @@ class SimpleHTTPClientTestMixin(AsyncTestCase):
         cleanup_event.set()
         yield gen.sleep(0.2)
 
-    @skipOnTravis
     def test_request_timeout(self):
         timeout = 0.1
         if os.name == "nt":
index 1636a649b82b4e211eae8688d67c2752bf628b43..73b383cbab94f3805c86e641a79b1c032c3cbaee 100644 (file)
@@ -64,8 +64,6 @@ class TCPClientTest(AsyncTestCase):
         self.client = TCPClient()
 
     def start_server(self, family):
-        if family == socket.AF_UNSPEC and "TRAVIS" in os.environ:
-            self.skipTest("dual-stack servers often have port conflicts on travis")
         self.server = TestTCPServer(family)
         return self.server.port
 
index 40ff9d65e60d895f28f85847ebc230914e0b61b0..2e8bc3e5f1ec7902d185493ecafc3fe0773522b1 100644 (file)
@@ -16,12 +16,6 @@ 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"
-)
-
 # Set the environment variable NO_NETWORK=1 to disable any tests that
 # depend on an external network.
 skipIfNoNetwork = unittest.skipIf("NO_NETWORK" in os.environ, "network access disabled")
@@ -67,7 +61,7 @@ def refusing_port():
     Return value is (cleanup_func, port); the cleanup function
     must be called to free the port to be reused.
     """
-    # On travis-ci, port numbers are reassigned frequently. To avoid
+    # On travis-ci port numbers are reassigned frequently. To avoid
     # collisions with other tests, we use an open client-side socket's
     # ephemeral port number to ensure that nothing can listen on that
     # port.