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

Class GetInfoFlightServer

python/pyarrow/tests/test_flight.py:287–311  ·  view source on GitHub ↗

A Flight server that tests GetFlightInfo.

Source from the content-addressed store, hash-verified

285
286
287class GetInfoFlightServer(FlightServerBase):
288 """A Flight server that tests GetFlightInfo."""
289
290 def get_flight_info(self, context, descriptor):
291 return flight.FlightInfo(
292 pa.schema([('a', pa.int32())]),
293 descriptor,
294 [
295 flight.FlightEndpoint(b'', ['grpc://test']),
296 flight.FlightEndpoint(
297 b'',
298 [flight.Location.for_grpc_tcp('localhost', 5005)],
299 pa.scalar("2023-04-05T12:34:56.789012345").cast(pa.timestamp("ns")),
300 "endpoint app metadata"
301 ),
302 ],
303 1,
304 42,
305 True,
306 "info app metadata"
307 )
308
309 def get_schema(self, context, descriptor):
310 info = self.get_flight_info(context, descriptor)
311 return flight.SchemaResult(info.schema)
312
313
314class ListActionsFlightServer(FlightServerBase):

Callers 3

test_flight_get_infoFunction · 0.85
test_flight_get_schemaFunction · 0.85
test_get_portFunction · 0.85

Calls

no outgoing calls

Tested by 3

test_flight_get_infoFunction · 0.68
test_flight_get_schemaFunction · 0.68
test_get_portFunction · 0.68