Make sure timeouts fire on slow requests.
()
| 1518 | |
| 1519 | |
| 1520 | def test_timeout_fires(): |
| 1521 | """Make sure timeouts fire on slow requests.""" |
| 1522 | # Do this in a separate thread so that if it fails, we don't hang |
| 1523 | # the entire test process |
| 1524 | with SlowFlightServer() as server, \ |
| 1525 | FlightClient(('localhost', server.port)) as client: |
| 1526 | action = flight.Action("", b"") |
| 1527 | options = flight.FlightCallOptions(timeout=0.2) |
| 1528 | # gRPC error messages change based on version, so don't look |
| 1529 | # for a particular error |
| 1530 | with pytest.raises(flight.FlightTimedOutError): |
| 1531 | list(client.do_action(action, options=options)) |
| 1532 | |
| 1533 | |
| 1534 | def test_timeout_passes(): |
nothing calls this directly
no test coverage detected