Emulate DoGet with DoExchange.
()
| 2246 | |
| 2247 | |
| 2248 | def test_doexchange_get(): |
| 2249 | """Emulate DoGet with DoExchange.""" |
| 2250 | expected = pa.Table.from_arrays([ |
| 2251 | pa.array(range(0, 10 * 1024)) |
| 2252 | ], names=["a"]) |
| 2253 | |
| 2254 | with ExchangeFlightServer() as server, \ |
| 2255 | FlightClient(("localhost", server.port)) as client: |
| 2256 | descriptor = flight.FlightDescriptor.for_command(b"get") |
| 2257 | writer, reader = client.do_exchange(descriptor) |
| 2258 | with writer: |
| 2259 | table = reader.read_all() |
| 2260 | assert expected == table |
| 2261 | |
| 2262 | |
| 2263 | def test_doexchange_put(): |
nothing calls this directly
no test coverage detected