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

Function test_cancel_do_get

python/pyarrow/tests/test_flight.py:1911–1919  ·  view source on GitHub ↗

Test canceling a DoGet operation on the client side.

()

Source from the content-addressed store, hash-verified

1909
1910@pytest.mark.slow
1911def test_cancel_do_get():
1912 """Test canceling a DoGet operation on the client side."""
1913 with ConstantFlightServer() as server, \
1914 FlightClient(('localhost', server.port)) as client:
1915 reader = client.do_get(flight.Ticket(b'ints'))
1916 reader.cancel()
1917 with pytest.raises(flight.FlightCancelledError,
1918 match="(?i).*cancel.*"):
1919 reader.read_chunk()
1920
1921
1922@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