Try a simple do_get call over a Unix domain socket.
()
| 1394 | @pytest.mark.skipif(os.name == 'nt', |
| 1395 | reason="Unix sockets can't be tested on Windows") |
| 1396 | def test_flight_domain_socket(): |
| 1397 | """Try a simple do_get call over a Unix domain socket.""" |
| 1398 | with tempfile.NamedTemporaryFile() as sock: |
| 1399 | sock.close() |
| 1400 | location = flight.Location.for_grpc_unix(sock.name) |
| 1401 | with ConstantFlightServer(location=location), \ |
| 1402 | FlightClient(location) as client: |
| 1403 | |
| 1404 | reader = client.do_get(flight.Ticket(b'ints')) |
| 1405 | table = simple_ints_table() |
| 1406 | assert reader.schema.equals(table.schema) |
| 1407 | data = reader.read_all() |
| 1408 | assert data.equals(table) |
| 1409 | |
| 1410 | reader = client.do_get(flight.Ticket(b'dicts')) |
| 1411 | table = simple_dicts_table() |
| 1412 | assert reader.schema.equals(table.schema) |
| 1413 | data = reader.read_all() |
| 1414 | assert data.equals(table) |
| 1415 | |
| 1416 | |
| 1417 | @pytest.mark.slow |
nothing calls this directly
no test coverage detected