Emulate DoGet with DoExchange.
()
| 2208 | |
| 2209 | |
| 2210 | def test_doexchange_get(): |
| 2211 | """Emulate DoGet with DoExchange.""" |
| 2212 | expected = pa.Table.from_arrays([ |
| 2213 | pa.array(range(0, 10 * 1024)) |
| 2214 | ], names=["a"]) |
| 2215 | |
| 2216 | with ExchangeFlightServer() as server, \ |
| 2217 | FlightClient(("localhost", server.port)) as client: |
| 2218 | descriptor = flight.FlightDescriptor.for_command(b"get") |
| 2219 | writer, reader = client.do_exchange(descriptor) |
| 2220 | with writer: |
| 2221 | table = reader.read_all() |
| 2222 | assert expected == table |
| 2223 | |
| 2224 | |
| 2225 | def test_doexchange_put(): |
nothing calls this directly
no test coverage detected