From: Ben Darnell Date: Fri, 11 Aug 2023 01:41:40 +0000 (-0400) Subject: httpserver_test: Add ExpectLog to fix CI X-Git-Tag: v6.4.0b1~15^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3306%2Fhead;p=thirdparty%2Ftornado.git httpserver_test: Add ExpectLog to fix CI 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. --- diff --git a/tornado/test/httpserver_test.py b/tornado/test/httpserver_test.py index db91d62da..1faf63fab 100644 --- a/tornado/test/httpserver_test.py +++ b/tornado/test/httpserver_test.py @@ -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