(self)
| 1285 | |
| 1286 | @gen_test |
| 1287 | def test_timeout(self): |
| 1288 | stream = IOStream(socket.socket()) |
| 1289 | try: |
| 1290 | yield stream.connect(("127.0.0.1", self.get_http_port())) |
| 1291 | # Use a raw stream because AsyncHTTPClient won't let us read a |
| 1292 | # response without finishing a body. |
| 1293 | stream.write( |
| 1294 | b"PUT /streaming?body_timeout=0.1 HTTP/1.0\r\n" |
| 1295 | b"Content-Length: 42\r\n\r\n" |
| 1296 | ) |
| 1297 | with ExpectLog(gen_log, "Timeout reading body", level=logging.INFO): |
| 1298 | response = yield stream.read_until_close() |
| 1299 | self.assertEqual(response, b"") |
| 1300 | finally: |
| 1301 | stream.close() |
| 1302 | |
| 1303 | @gen_test |
| 1304 | def test_body_size_override_reset(self): |
nothing calls this directly
no test coverage detected