Regression test for ARROW-13253.
| 907 | |
| 908 | |
| 909 | class LargeMetadataFlightServer(FlightServerBase): |
| 910 | """Regression test for ARROW-13253.""" |
| 911 | |
| 912 | def __init__(self, *args, **kwargs): |
| 913 | super().__init__(*args, **kwargs) |
| 914 | self._metadata = b' ' * (2 ** 31 + 1) |
| 915 | |
| 916 | def do_get(self, context, ticket): |
| 917 | schema = pa.schema([('a', pa.int64())]) |
| 918 | return flight.GeneratorStream(schema, [ |
| 919 | (pa.record_batch([[1]], schema=schema), self._metadata), |
| 920 | ]) |
| 921 | |
| 922 | def do_exchange(self, context, descriptor, reader, writer): |
| 923 | writer.write_metadata(self._metadata) |
| 924 | |
| 925 | |
| 926 | def test_repr(): |
no outgoing calls