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

Function test_cancel_do_get

python/pyarrow/tests/test_flight.py:1949–1957  ·  view source on GitHub ↗

Test canceling a DoGet operation on the client side.

()

Source from the content-addressed store, hash-verified

1947
1948@pytest.mark.slow
1949def test_cancel_do_get():
1950 """Test canceling a DoGet operation on the client side."""
1951 with ConstantFlightServer() as server, \
1952 FlightClient(('localhost', server.port)) as client:
1953 reader = client.do_get(flight.Ticket(b'ints'))
1954 reader.cancel()
1955 with pytest.raises(flight.FlightCancelledError,
1956 match="(?i).*cancel.*"):
1957 reader.read_chunk()
1958
1959
1960@pytest.mark.threading

Callers

nothing calls this directly

Calls 4

FlightClientClass · 0.90
cancelMethod · 0.80
do_getMethod · 0.45

Tested by

no test coverage detected