Try sending/receiving a large message via Flight. See ARROW-4421: by default, gRPC won't allow us to send messages > 4MiB in size.
()
| 1416 | |
| 1417 | @pytest.mark.slow |
| 1418 | def 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 | |
| 1439 | def test_flight_generator_stream_of_batches(): |
nothing calls this directly
no test coverage detected