Make sure timeouts fire on slow requests.
()
| 1556 | |
| 1557 | |
| 1558 | def test_timeout_fires(): |
| 1559 | """Make sure timeouts fire on slow requests.""" |
| 1560 | # Do this in a separate thread so that if it fails, we don't hang |
| 1561 | # the entire test process |
| 1562 | with SlowFlightServer() as server, \ |
| 1563 | FlightClient(('localhost', server.port)) as client: |
| 1564 | action = flight.Action("", b"") |
| 1565 | options = flight.FlightCallOptions(timeout=0.2) |
| 1566 | # gRPC error messages change based on version, so don't look |
| 1567 | # for a particular error |
| 1568 | with pytest.raises(flight.FlightTimedOutError): |
| 1569 | list(client.do_action(action, options=options)) |
| 1570 | |
| 1571 | |
| 1572 | def test_timeout_passes(): |
nothing calls this directly
no test coverage detected