Try a simple do_get call over a Unix domain socket.
()
| 1356 | @pytest.mark.skipif(os.name == 'nt', |
| 1357 | reason="Unix sockets can't be tested on Windows") |
| 1358 | def test_flight_domain_socket(): |
| 1359 | """Try a simple do_get call over a Unix domain socket.""" |
| 1360 | with tempfile.NamedTemporaryFile() as sock: |
| 1361 | sock.close() |
| 1362 | location = flight.Location.for_grpc_unix(sock.name) |
| 1363 | with ConstantFlightServer(location=location), \ |
| 1364 | FlightClient(location) as client: |
| 1365 | |
| 1366 | reader = client.do_get(flight.Ticket(b'ints')) |
| 1367 | table = simple_ints_table() |
| 1368 | assert reader.schema.equals(table.schema) |
| 1369 | data = reader.read_all() |
| 1370 | assert data.equals(table) |
| 1371 | |
| 1372 | reader = client.do_get(flight.Ticket(b'dicts')) |
| 1373 | table = simple_dicts_table() |
| 1374 | assert reader.schema.equals(table.schema) |
| 1375 | data = reader.read_all() |
| 1376 | assert data.equals(table) |
| 1377 | |
| 1378 | |
| 1379 | @pytest.mark.slow |
nothing calls this directly
no test coverage detected