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

Function test_timeout_fires

python/pyarrow/tests/test_flight.py:1520–1531  ·  view source on GitHub ↗

Make sure timeouts fire on slow requests.

()

Source from the content-addressed store, hash-verified

1518
1519
1520def 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
1534def 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