()
| 2517 | @pytest.mark.large_memory |
| 2518 | @pytest.mark.slow |
| 2519 | def test_large_metadata_client(): |
| 2520 | # Regression test for ARROW-13253 |
| 2521 | descriptor = flight.FlightDescriptor.for_command(b'') |
| 2522 | metadata = b' ' * (2 ** 31 + 1) |
| 2523 | with EchoFlightServer() as server, \ |
| 2524 | flight.connect(('localhost', server.port)) as client: |
| 2525 | with pytest.raises(pa.ArrowCapacityError, |
| 2526 | match="app_metadata size overflow"): |
| 2527 | writer, _ = client.do_put(descriptor, pa.schema([])) |
| 2528 | with writer: |
| 2529 | writer.write_metadata(metadata) |
| 2530 | writer.close() |
| 2531 | with pytest.raises(pa.ArrowCapacityError, |
| 2532 | match="app_metadata size overflow"): |
| 2533 | writer, reader = client.do_exchange(descriptor) |
| 2534 | with writer: |
| 2535 | writer.write_metadata(metadata) |
| 2536 | |
| 2537 | del metadata |
| 2538 | with LargeMetadataFlightServer() as server, \ |
| 2539 | flight.connect(('localhost', server.port)) as client: |
| 2540 | with pytest.raises(flight.FlightServerError, |
| 2541 | match="app_metadata size overflow"): |
| 2542 | reader = client.do_get(flight.Ticket(b'')) |
| 2543 | reader.read_all() |
| 2544 | with pytest.raises(pa.ArrowException, |
| 2545 | match="app_metadata size overflow"): |
| 2546 | writer, reader = client.do_exchange(descriptor) |
| 2547 | with writer: |
| 2548 | reader.read_all() |
| 2549 | |
| 2550 | |
| 2551 | class ActionNoneFlightServer(EchoFlightServer): |
nothing calls this directly
no test coverage detected