]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
httpserver_test: Add ExpectLog to fix CI 3306/head
authorBen Darnell <ben@bendarnell.com>
Fri, 11 Aug 2023 01:41:40 +0000 (21:41 -0400)
committerBen Darnell <ben@bendarnell.com>
Fri, 11 Aug 2023 01:41:40 +0000 (21:41 -0400)
The github security advisory feature lets you make private PRs but
it apparently doesn't support CI so this log failure wasn't caught
until after the PR was merged.

tornado/test/httpserver_test.py

index db91d62daae03d4bb3419b8c34b443ccdc414fb4..1faf63fabfa53019058f1460a87865dcdad589fd 100644 (file)
@@ -575,9 +575,10 @@ Transfer-Encoding: chunked
                 b"\n", b"\r\n"
             )
         )
-        start_line, headers, response = self.io_loop.run_sync(
-            lambda: read_stream_body(self.stream)
-        )
+        with ExpectLog(gen_log, ".*invalid chunk size", level=logging.INFO):
+            start_line, headers, response = self.io_loop.run_sync(
+                lambda: read_stream_body(self.stream)
+            )
         self.assertEqual(400, start_line.code)
 
     @gen_test