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

Function test_flight_large_message

python/pyarrow/tests/test_flight.py:1418–1436  ·  view source on GitHub ↗

Try sending/receiving a large message via Flight. See ARROW-4421: by default, gRPC won't allow us to send messages > 4MiB in size.

()

Source from the content-addressed store, hash-verified

1416
1417@pytest.mark.slow
1418def test_flight_large_message():
1419 """Try sending/receiving a large message via Flight.
1420
1421 See ARROW-4421: by default, gRPC won't allow us to send messages >
1422 4MiB in size.
1423 """
1424 data = pa.Table.from_arrays([
1425 pa.array(range(0, 10 * 1024 * 1024))
1426 ], names=['a'])
1427
1428 with EchoFlightServer(expected_schema=data.schema) as server, \
1429 FlightClient(('localhost', server.port)) as client:
1430 writer, _ = client.do_put(flight.FlightDescriptor.for_path('test'),
1431 data.schema)
1432 # Write a single giant chunk
1433 writer.write_table(data, 10 * 1024 * 1024)
1434 writer.close()
1435 result = client.do_get(flight.Ticket(b'')).read_all()
1436 assert result.equals(data)
1437
1438
1439def test_flight_generator_stream_of_batches():

Callers

nothing calls this directly

Calls 8

FlightClientClass · 0.90
EchoFlightServerClass · 0.85
equalsMethod · 0.80
arrayMethod · 0.45
do_putMethod · 0.45
write_tableMethod · 0.45
closeMethod · 0.45
do_getMethod · 0.45

Tested by

no test coverage detected