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:1177–1194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1175@pytest.mark.threading
1176@pytest.mark.slow
1177def test_client_wait_for_available():
1178 location = ('localhost', find_free_port())
1179 server = None
1180
1181 def serve():
1182 global server
1183 time.sleep(0.5)
1184 server = FlightServerBase(location)
1185 server.serve()
1186
1187 with FlightClient(location) as client:
1188 thread = threading.Thread(target=serve, daemon=True)
1189 thread.start()
1190
1191 started = time.time()
1192 client.wait_for_available(timeout=5)
1193 elapsed = time.time() - started
1194 assert elapsed >= 0.5
1195
1196
1197def 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