]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
test: Use larger time values in testing_test 2885/head
authorBen Darnell <ben@cockroachlabs.com>
Sun, 28 Jun 2020 19:12:29 +0000 (15:12 -0400)
committerBen Darnell <ben@cockroachlabs.com>
Sun, 28 Jun 2020 19:12:29 +0000 (15:12 -0400)
This test was flaky on appveyor. Also expand comments about what
exactly the test is doing.

tornado/test/testing_test.py

index 594d4af2f47f2138ea79409cd00a8f5d9a238d97..e09023003746d85a2bb0519ae41386176a5e4667 100644 (file)
@@ -51,10 +51,13 @@ class AsyncTestCaseTest(AsyncTestCase):
         This test makes sure that a second call to wait()
         clears the first timeout.
         """
+        # The first wait ends with time left on the clock
         self.io_loop.add_timeout(self.io_loop.time() + 0.00, self.stop)
-        self.wait(timeout=0.02)
-        self.io_loop.add_timeout(self.io_loop.time() + 0.03, self.stop)
-        self.wait(timeout=0.15)
+        self.wait(timeout=0.1)
+        # The second wait has enough time for itself but would fail if the
+        # first wait's deadline were still in effect.
+        self.io_loop.add_timeout(self.io_loop.time() + 0.2, self.stop)
+        self.wait(timeout=0.4)
 
 
 class LeakTest(AsyncTestCase):