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

Function test_client_wait_for_available

python/pyarrow/tests/test_flight.py:1139–1156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1137@pytest.mark.threading
1138@pytest.mark.slow
1139def test_client_wait_for_available():
1140 location = ('localhost', find_free_port())
1141 server = None
1142
1143 def serve():
1144 global server
1145 time.sleep(0.5)
1146 server = FlightServerBase(location)
1147 server.serve()
1148
1149 with FlightClient(location) as client:
1150 thread = threading.Thread(target=serve, daemon=True)
1151 thread.start()
1152
1153 started = time.time()
1154 client.wait_for_available(timeout=5)
1155 elapsed = time.time() - started
1156 assert elapsed >= 0.5
1157
1158
1159def test_flight_list_flights():

Callers

nothing calls this directly

Calls 4

find_free_portFunction · 0.90
FlightClientClass · 0.90
timeMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected