(self)
| 1465 | |
| 1466 | @gen_test |
| 1467 | def test_timeout(self): |
| 1468 | stream = IOStream(socket.socket()) |
| 1469 | try: |
| 1470 | yield stream.connect(("127.0.0.1", self.get_http_port())) |
| 1471 | # Use a raw stream because AsyncHTTPClient won't let us read a |
| 1472 | # response without finishing a body. |
| 1473 | stream.write( |
| 1474 | b"PUT /streaming?body_timeout=0.1 HTTP/1.0\r\n" |
| 1475 | b"Content-Length: 42\r\n\r\n" |
| 1476 | ) |
| 1477 | with ExpectLog(gen_log, "Timeout reading body", level=logging.INFO): |
| 1478 | response = yield stream.read_until_close() |
| 1479 | self.assertEqual(response, b"") |
| 1480 | finally: |
| 1481 | stream.close() |
| 1482 | |
| 1483 | @gen_test |
| 1484 | def test_body_size_override_reset(self): |
nothing calls this directly
no test coverage detected