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

Function test_flight_large_message

python/pyarrow/tests/test_flight.py:1380–1398  ·  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

1378
1379@pytest.mark.slow
1380def test_flight_large_message():
1381 """Try sending/receiving a large message via Flight.
1382
1383 See ARROW-4421: by default, gRPC won't allow us to send messages >
1384 4MiB in size.
1385 """
1386 data = pa.Table.from_arrays([
1387 pa.array(range(0, 10 * 1024 * 1024))
1388 ], names=['a'])
1389
1390 with EchoFlightServer(expected_schema=data.schema) as server, \
1391 FlightClient(('localhost', server.port)) as client:
1392 writer, _ = client.do_put(flight.FlightDescriptor.for_path('test'),
1393 data.schema)
1394 # Write a single giant chunk
1395 writer.write_table(data, 10 * 1024 * 1024)
1396 writer.close()
1397 result = client.do_get(flight.Ticket(b'')).read_all()
1398 assert result.equals(data)
1399
1400
1401def 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