()
| 2479 | @pytest.mark.large_memory |
| 2480 | @pytest.mark.slow |
| 2481 | def test_large_metadata_client(): |
| 2482 | # Regression test for ARROW-13253 |
| 2483 | descriptor = flight.FlightDescriptor.for_command(b'') |
| 2484 | metadata = b' ' * (2 ** 31 + 1) |
| 2485 | with EchoFlightServer() as server, \ |
| 2486 | flight.connect(('localhost', server.port)) as client: |
| 2487 | with pytest.raises(pa.ArrowCapacityError, |
| 2488 | match="app_metadata size overflow"): |
| 2489 | writer, _ = client.do_put(descriptor, pa.schema([])) |
| 2490 | with writer: |
| 2491 | writer.write_metadata(metadata) |
| 2492 | writer.close() |
| 2493 | with pytest.raises(pa.ArrowCapacityError, |
| 2494 | match="app_metadata size overflow"): |
| 2495 | writer, reader = client.do_exchange(descriptor) |
| 2496 | with writer: |
| 2497 | writer.write_metadata(metadata) |
| 2498 | |
| 2499 | del metadata |
| 2500 | with LargeMetadataFlightServer() as server, \ |
| 2501 | flight.connect(('localhost', server.port)) as client: |
| 2502 | with pytest.raises(flight.FlightServerError, |
| 2503 | match="app_metadata size overflow"): |
| 2504 | reader = client.do_get(flight.Ticket(b'')) |
| 2505 | reader.read_all() |
| 2506 | with pytest.raises(pa.ArrowException, |
| 2507 | match="app_metadata size overflow"): |
| 2508 | writer, reader = client.do_exchange(descriptor) |
| 2509 | with writer: |
| 2510 | reader.read_all() |
| 2511 | |
| 2512 | |
| 2513 | class ActionNoneFlightServer(EchoFlightServer): |
nothing calls this directly
no test coverage detected