MCPcopy Create free account
hub / github.com/apache/arrow / test_timeout_fires

Function test_timeout_fires

python/pyarrow/tests/test_flight.py:1558–1569  ·  view source on GitHub ↗

Make sure timeouts fire on slow requests.

()

Source from the content-addressed store, hash-verified

1556
1557
1558def 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
1572def test_timeout_passes():

Callers

nothing calls this directly

Calls 5

FlightClientClass · 0.90
SlowFlightServerClass · 0.85
listFunction · 0.85
FlightCallOptionsMethod · 0.80
do_actionMethod · 0.45

Tested by

no test coverage detected