MCPcopy Create free account
hub / github.com/apache/arrow / test_flight_domain_socket

Function test_flight_domain_socket

python/pyarrow/tests/test_flight.py:1396–1414  ·  view source on GitHub ↗

Try a simple do_get call over a Unix domain socket.

()

Source from the content-addressed store, hash-verified

1394@pytest.mark.skipif(os.name == 'nt',
1395 reason="Unix sockets can't be tested on Windows")
1396def 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

Callers

nothing calls this directly

Calls 7

FlightClientClass · 0.90
simple_ints_tableFunction · 0.85
simple_dicts_tableFunction · 0.85
equalsMethod · 0.80
closeMethod · 0.45
do_getMethod · 0.45

Tested by

no test coverage detected