_rpc_test_helpers.py
Go to the documentation of this file.
1 # Copyright 2020 The gRPC Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 """Test helpers for RPC invocation tests."""
15 
16 import datetime
17 import threading
18 
19 import grpc
20 from grpc.framework.foundation import logging_pool
21 
22 from tests.unit import test_common
23 from tests.unit import thread_pool
24 from tests.unit.framework.common import test_constants
25 from tests.unit.framework.common import test_control
26 
27 _SERIALIZE_REQUEST = lambda bytestring: bytestring * 2
28 _DESERIALIZE_REQUEST = lambda bytestring: bytestring[len(bytestring) // 2:]
29 _SERIALIZE_RESPONSE = lambda bytestring: bytestring * 3
30 _DESERIALIZE_RESPONSE = lambda bytestring: bytestring[:len(bytestring) // 3]
31 
32 _UNARY_UNARY = '/test/UnaryUnary'
33 _UNARY_STREAM = '/test/UnaryStream'
34 _UNARY_STREAM_NON_BLOCKING = '/test/UnaryStreamNonBlocking'
35 _STREAM_UNARY = '/test/StreamUnary'
36 _STREAM_STREAM = '/test/StreamStream'
37 _STREAM_STREAM_NON_BLOCKING = '/test/StreamStreamNonBlocking'
38 
39 TIMEOUT_SHORT = datetime.timedelta(seconds=4).total_seconds()
40 
41 
42 class Callback(object):
43 
44  def __init__(self):
45  self._condition = threading.Condition()
46  self._value = None
47  self._called = False
48 
49  def __call__(self, value):
50  with self._condition:
51  self._value = value
52  self._called = True
53  self._condition.notify_all()
54 
55  def value(self):
56  with self._condition:
57  while not self._called:
58  self._condition.wait()
59  return self._value
60 
61 
62 class _Handler(object):
63 
64  def __init__(self, control, thread_pool):
65  self._control = control
66  self._thread_pool = thread_pool
67  non_blocking_functions = (self.handle_unary_stream_non_blocking,
69  for non_blocking_function in non_blocking_functions:
70  non_blocking_function.__func__.experimental_non_blocking = True
71  non_blocking_function.__func__.experimental_thread_pool = self._thread_pool
72 
73  def handle_unary_unary(self, request, servicer_context):
74  self._control.control()
75  if servicer_context is not None:
76  servicer_context.set_trailing_metadata(((
77  'testkey',
78  'testvalue',
79  ),))
80  # TODO(https://github.com/grpc/grpc/issues/8483): test the values
81  # returned by these methods rather than only "smoke" testing that
82  # the return after having been called.
83  servicer_context.is_active()
84  servicer_context.time_remaining()
85  return request
86 
87  def handle_unary_stream(self, request, servicer_context):
88  for _ in range(test_constants.STREAM_LENGTH):
89  self._control.control()
90  yield request
91  self._control.control()
92  if servicer_context is not None:
93  servicer_context.set_trailing_metadata(((
94  'testkey',
95  'testvalue',
96  ),))
97 
98  def handle_unary_stream_non_blocking(self, request, servicer_context,
99  on_next):
100  for _ in range(test_constants.STREAM_LENGTH):
101  self._control.control()
102  on_next(request)
103  self._control.control()
104  if servicer_context is not None:
105  servicer_context.set_trailing_metadata(((
106  'testkey',
107  'testvalue',
108  ),))
109  on_next(None)
110 
111  def handle_stream_unary(self, request_iterator, servicer_context):
112  if servicer_context is not None:
113  servicer_context.invocation_metadata()
114  self._control.control()
115  response_elements = []
116  for request in request_iterator:
117  self._control.control()
118  response_elements.append(request)
119  self._control.control()
120  if servicer_context is not None:
121  servicer_context.set_trailing_metadata(((
122  'testkey',
123  'testvalue',
124  ),))
125  return b''.join(response_elements)
126 
127  def handle_stream_stream(self, request_iterator, servicer_context):
128  self._control.control()
129  if servicer_context is not None:
130  servicer_context.set_trailing_metadata(((
131  'testkey',
132  'testvalue',
133  ),))
134  for request in request_iterator:
135  self._control.control()
136  yield request
137  self._control.control()
138 
139  def handle_stream_stream_non_blocking(self, request_iterator,
140  servicer_context, on_next):
141  self._control.control()
142  if servicer_context is not None:
143  servicer_context.set_trailing_metadata(((
144  'testkey',
145  'testvalue',
146  ),))
147  for request in request_iterator:
148  self._control.control()
149  on_next(request)
150  self._control.control()
151  on_next(None)
152 
153 
155 
156  def __init__(self, request_streaming, response_streaming,
157  request_deserializer, response_serializer, unary_unary,
158  unary_stream, stream_unary, stream_stream):
159  self.request_streaming = request_streaming
160  self.response_streaming = response_streaming
161  self.request_deserializer = request_deserializer
162  self.response_serializer = response_serializer
163  self.unary_unary = unary_unary
164  self.unary_stream = unary_stream
165  self.stream_unary = stream_unary
166  self.stream_stream = stream_stream
167 
168 
170 
171  def __init__(self, handler):
172  self._handler = handler
173 
174  def service(self, handler_call_details):
175  if handler_call_details.method == _UNARY_UNARY:
176  return _MethodHandler(False, False, None, None,
177  self._handler.handle_unary_unary, None, None,
178  None)
179  elif handler_call_details.method == _UNARY_STREAM:
180  return _MethodHandler(False, True, _DESERIALIZE_REQUEST,
181  _SERIALIZE_RESPONSE, None,
182  self._handler.handle_unary_stream, None, None)
183  elif handler_call_details.method == _UNARY_STREAM_NON_BLOCKING:
184  return _MethodHandler(
185  False, True, _DESERIALIZE_REQUEST, _SERIALIZE_RESPONSE, None,
186  self._handler.handle_unary_stream_non_blocking, None, None)
187  elif handler_call_details.method == _STREAM_UNARY:
188  return _MethodHandler(True, False, _DESERIALIZE_REQUEST,
189  _SERIALIZE_RESPONSE, None, None,
190  self._handler.handle_stream_unary, None)
191  elif handler_call_details.method == _STREAM_STREAM:
192  return _MethodHandler(True, True, None, None, None, None, None,
193  self._handler.handle_stream_stream)
194  elif handler_call_details.method == _STREAM_STREAM_NON_BLOCKING:
195  return _MethodHandler(
196  True, True, None, None, None, None, None,
197  self._handler.handle_stream_stream_non_blocking)
198  else:
199  return None
200 
201 
203  return channel.unary_unary(_UNARY_UNARY)
204 
205 
207  return channel.unary_stream(_UNARY_STREAM,
208  request_serializer=_SERIALIZE_REQUEST,
209  response_deserializer=_DESERIALIZE_RESPONSE)
210 
211 
213  return channel.unary_stream(_UNARY_STREAM_NON_BLOCKING,
214  request_serializer=_SERIALIZE_REQUEST,
215  response_deserializer=_DESERIALIZE_RESPONSE)
216 
217 
219  return channel.stream_unary(_STREAM_UNARY,
220  request_serializer=_SERIALIZE_REQUEST,
221  response_deserializer=_DESERIALIZE_RESPONSE)
222 
223 
225  return channel.stream_stream(_STREAM_STREAM)
226 
227 
229  return channel.stream_stream(_STREAM_STREAM_NON_BLOCKING)
230 
231 
232 class BaseRPCTest(object):
233 
234  def setUp(self):
235  self._control = test_control.PauseFailControl()
238 
239  self._server = test_common.test_server()
240  port = self._server.add_insecure_port('[::]:0')
241  self._server.add_generic_rpc_handlers((_GenericHandler(self._handler),))
242  self._server.start()
243 
244  self._channel = grpc.insecure_channel('localhost:%d' % port)
245 
246  def tearDown(self):
247  self._server.stop(None)
248  self._channel.close()
249 
251  request = b'\x57\x38'
252 
253  response_iterator = multi_callable(
254  request,
255  metadata=(('test', 'ConsumingOneStreamResponseUnaryRequest'),))
256  next(response_iterator)
257 
259  self, multi_callable):
260  request = b'\x57\x38'
261 
262  response_iterator = multi_callable(
263  request,
264  metadata=(('test',
265  'ConsumingSomeButNotAllStreamResponsesUnaryRequest'),))
266  for _ in range(test_constants.STREAM_LENGTH // 2):
267  next(response_iterator)
268 
270  self, multi_callable):
271  requests = tuple(
272  b'\x67\x88' for _ in range(test_constants.STREAM_LENGTH))
273  request_iterator = iter(requests)
274 
275  response_iterator = multi_callable(
276  request_iterator,
277  metadata=(('test',
278  'ConsumingSomeButNotAllStreamResponsesStreamRequest'),))
279  for _ in range(test_constants.STREAM_LENGTH // 2):
280  next(response_iterator)
281 
283  requests = tuple(
284  b'\x67\x88' for _ in range(test_constants.STREAM_LENGTH))
285  request_iterator = iter(requests)
286 
287  response_iterator = multi_callable(
288  request_iterator,
289  metadata=(('test',
290  'ConsumingTooManyStreamResponsesStreamRequest'),))
291  for _ in range(test_constants.STREAM_LENGTH):
292  next(response_iterator)
293  for _ in range(test_constants.STREAM_LENGTH):
294  with self.assertRaises(StopIteration):
295  next(response_iterator)
296 
297  self.assertIsNotNone(response_iterator.initial_metadata())
298  self.assertIs(grpc.StatusCode.OK, response_iterator.code())
299  self.assertIsNotNone(response_iterator.details())
300  self.assertIsNotNone(response_iterator.trailing_metadata())
301 
302  def _cancelled_unary_request_stream_response(self, multi_callable):
303  request = b'\x07\x19'
304 
305  with self._control.pause():
306  response_iterator = multi_callable(
307  request,
308  metadata=(('test', 'CancelledUnaryRequestStreamResponse'),))
309  self._control.block_until_paused()
310  response_iterator.cancel()
311 
312  with self.assertRaises(grpc.RpcError) as exception_context:
313  next(response_iterator)
314  self.assertIs(grpc.StatusCode.CANCELLED,
315  exception_context.exception.code())
316  self.assertIsNotNone(response_iterator.initial_metadata())
317  self.assertIs(grpc.StatusCode.CANCELLED, response_iterator.code())
318  self.assertIsNotNone(response_iterator.details())
319  self.assertIsNotNone(response_iterator.trailing_metadata())
320 
321  def _cancelled_stream_request_stream_response(self, multi_callable):
322  requests = tuple(
323  b'\x07\x08' for _ in range(test_constants.STREAM_LENGTH))
324  request_iterator = iter(requests)
325 
326  with self._control.pause():
327  response_iterator = multi_callable(
328  request_iterator,
329  metadata=(('test', 'CancelledStreamRequestStreamResponse'),))
330  response_iterator.cancel()
331 
332  with self.assertRaises(grpc.RpcError):
333  next(response_iterator)
334  self.assertIsNotNone(response_iterator.initial_metadata())
335  self.assertIs(grpc.StatusCode.CANCELLED, response_iterator.code())
336  self.assertIsNotNone(response_iterator.details())
337  self.assertIsNotNone(response_iterator.trailing_metadata())
338 
339  def _expired_unary_request_stream_response(self, multi_callable):
340  request = b'\x07\x19'
341 
342  with self._control.pause():
343  with self.assertRaises(grpc.RpcError) as exception_context:
344  response_iterator = multi_callable(
345  request,
346  timeout=test_constants.SHORT_TIMEOUT,
347  metadata=(('test', 'ExpiredUnaryRequestStreamResponse'),))
348  next(response_iterator)
349 
350  self.assertIs(grpc.StatusCode.DEADLINE_EXCEEDED,
351  exception_context.exception.code())
352  self.assertIs(grpc.StatusCode.DEADLINE_EXCEEDED,
353  response_iterator.code())
354 
355  def _expired_stream_request_stream_response(self, multi_callable):
356  requests = tuple(
357  b'\x67\x18' for _ in range(test_constants.STREAM_LENGTH))
358  request_iterator = iter(requests)
359 
360  with self._control.pause():
361  with self.assertRaises(grpc.RpcError) as exception_context:
362  response_iterator = multi_callable(
363  request_iterator,
364  timeout=test_constants.SHORT_TIMEOUT,
365  metadata=(('test', 'ExpiredStreamRequestStreamResponse'),))
366  next(response_iterator)
367 
368  self.assertIs(grpc.StatusCode.DEADLINE_EXCEEDED,
369  exception_context.exception.code())
370  self.assertIs(grpc.StatusCode.DEADLINE_EXCEEDED,
371  response_iterator.code())
372 
373  def _failed_unary_request_stream_response(self, multi_callable):
374  request = b'\x37\x17'
375 
376  with self.assertRaises(grpc.RpcError) as exception_context:
377  with self._control.fail():
378  response_iterator = multi_callable(
379  request,
380  metadata=(('test', 'FailedUnaryRequestStreamResponse'),))
381  next(response_iterator)
382 
383  self.assertIs(grpc.StatusCode.UNKNOWN,
384  exception_context.exception.code())
385 
386  def _failed_stream_request_stream_response(self, multi_callable):
387  requests = tuple(
388  b'\x67\x88' for _ in range(test_constants.STREAM_LENGTH))
389  request_iterator = iter(requests)
390 
391  with self._control.fail():
392  with self.assertRaises(grpc.RpcError) as exception_context:
393  response_iterator = multi_callable(
394  request_iterator,
395  metadata=(('test', 'FailedStreamRequestStreamResponse'),))
396  tuple(response_iterator)
397 
398  self.assertIs(grpc.StatusCode.UNKNOWN,
399  exception_context.exception.code())
400  self.assertIs(grpc.StatusCode.UNKNOWN, response_iterator.code())
401 
403  self, multi_callable):
404  request = b'\x37\x17'
405 
406  multi_callable(request,
407  metadata=(('test',
408  'IgnoredUnaryRequestStreamResponse'),))
409 
410  def _ignored_stream_request_stream_response(self, multi_callable):
411  requests = tuple(
412  b'\x67\x88' for _ in range(test_constants.STREAM_LENGTH))
413  request_iterator = iter(requests)
414 
415  multi_callable(request_iterator,
416  metadata=(('test',
417  'IgnoredStreamRequestStreamResponse'),))
tests.unit._rpc_test_helpers._Handler.handle_stream_stream
def handle_stream_stream(self, request_iterator, servicer_context)
Definition: _rpc_test_helpers.py:127
grpc.insecure_channel
def insecure_channel(target, options=None, compression=None)
Definition: src/python/grpcio/grpc/__init__.py:1962
tests.unit._rpc_test_helpers._GenericHandler.__init__
def __init__(self, handler)
Definition: _rpc_test_helpers.py:171
tests.unit._rpc_test_helpers._MethodHandler.stream_unary
stream_unary
Definition: _rpc_test_helpers.py:163
grpc.framework.foundation
Definition: src/python/grpcio/grpc/framework/foundation/__init__.py:1
tests.unit._rpc_test_helpers.Callback.__init__
def __init__(self)
Definition: _rpc_test_helpers.py:44
tests.unit._rpc_test_helpers.BaseRPCTest._consume_one_stream_response_unary_request
def _consume_one_stream_response_unary_request(self, multi_callable)
Definition: _rpc_test_helpers.py:250
tests.unit._rpc_test_helpers.BaseRPCTest.setUp
def setUp(self)
Definition: _rpc_test_helpers.py:234
tests.unit._rpc_test_helpers.BaseRPCTest._consume_some_but_not_all_stream_responses_stream_request
def _consume_some_but_not_all_stream_responses_stream_request(self, multi_callable)
Definition: _rpc_test_helpers.py:269
tests.unit._rpc_test_helpers.BaseRPCTest._ignored_stream_request_stream_response
def _ignored_stream_request_stream_response(self, multi_callable)
Definition: _rpc_test_helpers.py:410
tests.unit._rpc_test_helpers._Handler.__init__
def __init__(self, control, thread_pool)
Definition: _rpc_test_helpers.py:64
capstone.range
range
Definition: third_party/bloaty/third_party/capstone/bindings/python/capstone/__init__.py:6
tests.unit._rpc_test_helpers.BaseRPCTest._cancelled_stream_request_stream_response
def _cancelled_stream_request_stream_response(self, multi_callable)
Definition: _rpc_test_helpers.py:321
tests.unit._rpc_test_helpers._Handler._thread_pool
_thread_pool
Definition: _rpc_test_helpers.py:66
tests.unit._rpc_test_helpers.BaseRPCTest._control
_control
Definition: _rpc_test_helpers.py:235
tests.unit._rpc_test_helpers.BaseRPCTest._failed_stream_request_stream_response
def _failed_stream_request_stream_response(self, multi_callable)
Definition: _rpc_test_helpers.py:386
tests.unit._rpc_test_helpers._GenericHandler
Definition: _rpc_test_helpers.py:169
tests.unit._rpc_test_helpers.Callback._called
_called
Definition: _rpc_test_helpers.py:47
grpc.RpcError
Definition: src/python/grpcio/grpc/__init__.py:302
tests.unit._rpc_test_helpers._MethodHandler.request_streaming
request_streaming
Definition: _rpc_test_helpers.py:157
tests.unit._rpc_test_helpers._MethodHandler
Definition: _rpc_test_helpers.py:154
start
static uint64_t start
Definition: benchmark-pound.c:74
tests.unit._exit_scenarios.multi_callable
multi_callable
Definition: _exit_scenarios.py:216
tests.unit._rpc_test_helpers._MethodHandler.unary_unary
unary_unary
Definition: _rpc_test_helpers.py:161
tests.unit._rpc_test_helpers._MethodHandler.stream_stream
stream_stream
Definition: _rpc_test_helpers.py:164
tests.unit._rpc_test_helpers.Callback.value
def value(self)
Definition: _rpc_test_helpers.py:55
tests.unit._rpc_test_helpers.BaseRPCTest._handler
_handler
Definition: _rpc_test_helpers.py:237
grpc.GenericRpcHandler
Definition: src/python/grpcio/grpc/__init__.py:1333
grpc_core::fail
Poll< absl::StatusOr< std::tuple< T... > > > fail()
Definition: try_join_test.cc:45
tests.unit._rpc_test_helpers.BaseRPCTest._thread_pool
_thread_pool
Definition: _rpc_test_helpers.py:236
close
#define close
Definition: test-fs.c:48
tests.unit._rpc_test_helpers._MethodHandler.request_deserializer
request_deserializer
Definition: _rpc_test_helpers.py:159
tests.unit._rpc_test_helpers.BaseRPCTest._failed_unary_request_stream_response
def _failed_unary_request_stream_response(self, multi_callable)
Definition: _rpc_test_helpers.py:373
tests.unit._rpc_test_helpers._GenericHandler.service
def service(self, handler_call_details)
Definition: _rpc_test_helpers.py:174
tests.unit._rpc_test_helpers.unary_stream_non_blocking_multi_callable
def unary_stream_non_blocking_multi_callable(channel)
Definition: _rpc_test_helpers.py:212
tests.unit._rpc_test_helpers.BaseRPCTest._expired_stream_request_stream_response
def _expired_stream_request_stream_response(self, multi_callable)
Definition: _rpc_test_helpers.py:355
tests.unit._rpc_test_helpers.BaseRPCTest
Definition: _rpc_test_helpers.py:232
tests.unit._rpc_test_helpers.BaseRPCTest.tearDown
def tearDown(self)
Definition: _rpc_test_helpers.py:246
tests.unit._rpc_test_helpers._Handler
Definition: _rpc_test_helpers.py:62
tests.unit._rpc_test_helpers.unary_unary_multi_callable
def unary_unary_multi_callable(channel)
Definition: _rpc_test_helpers.py:202
tests.unit._rpc_test_helpers.BaseRPCTest._cancelled_unary_request_stream_response
def _cancelled_unary_request_stream_response(self, multi_callable)
Definition: _rpc_test_helpers.py:302
tests.unit._rpc_test_helpers._Handler.handle_stream_unary
def handle_stream_unary(self, request_iterator, servicer_context)
Definition: _rpc_test_helpers.py:111
tests.unit._rpc_test_helpers.Callback._value
_value
Definition: _rpc_test_helpers.py:46
tests.unit._rpc_test_helpers._MethodHandler.__init__
def __init__(self, request_streaming, response_streaming, request_deserializer, response_serializer, unary_unary, unary_stream, stream_unary, stream_stream)
Definition: _rpc_test_helpers.py:156
tests.unit._rpc_test_helpers._GenericHandler._handler
_handler
Definition: _rpc_test_helpers.py:172
tests.unit
Definition: src/python/grpcio_tests/tests/unit/__init__.py:1
tests.unit._rpc_test_helpers.BaseRPCTest._consume_too_many_stream_responses_stream_request
def _consume_too_many_stream_responses_stream_request(self, multi_callable)
Definition: _rpc_test_helpers.py:282
tests.unit._rpc_test_helpers._MethodHandler.response_serializer
response_serializer
Definition: _rpc_test_helpers.py:160
tests.unit._rpc_test_helpers._Handler.handle_unary_stream
def handle_unary_stream(self, request, servicer_context)
Definition: _rpc_test_helpers.py:87
tests.unit._rpc_test_helpers.stream_stream_non_blocking_multi_callable
def stream_stream_non_blocking_multi_callable(channel)
Definition: _rpc_test_helpers.py:228
next
AllocList * next[kMaxLevel]
Definition: abseil-cpp/absl/base/internal/low_level_alloc.cc:100
tests.unit._rpc_test_helpers._Handler.handle_unary_unary
def handle_unary_unary(self, request, servicer_context)
Definition: _rpc_test_helpers.py:73
tests.unit._rpc_test_helpers._Handler._control
_control
Definition: _rpc_test_helpers.py:65
tests.unit.thread_pool.RecordingThreadPool
Definition: thread_pool.py:19
wait
static void wait(notification *n)
Definition: alts_tsi_handshaker_test.cc:114
tests.unit._rpc_test_helpers.Callback
Definition: _rpc_test_helpers.py:42
tests.unit._rpc_test_helpers._Handler.handle_unary_stream_non_blocking
def handle_unary_stream_non_blocking(self, request, servicer_context, on_next)
Definition: _rpc_test_helpers.py:98
tests.unit._rpc_test_helpers._MethodHandler.unary_stream
unary_stream
Definition: _rpc_test_helpers.py:162
tests.unit._rpc_test_helpers._MethodHandler.response_streaming
response_streaming
Definition: _rpc_test_helpers.py:158
tests.unit._rpc_test_helpers.BaseRPCTest._ignored_unary_stream_request_future_unary_response
def _ignored_unary_stream_request_future_unary_response(self, multi_callable)
Definition: _rpc_test_helpers.py:402
tests.unit._rpc_test_helpers.stream_unary_multi_callable
def stream_unary_multi_callable(channel)
Definition: _rpc_test_helpers.py:218
stop
static const char stop[]
Definition: benchmark-async-pummel.c:35
iter
Definition: test_winkernel.cpp:47
tests.unit.framework.common
Definition: src/python/grpcio_tests/tests/unit/framework/common/__init__.py:1
tests.unit._rpc_test_helpers.Callback._condition
_condition
Definition: _rpc_test_helpers.py:45
tests.unit._rpc_test_helpers.BaseRPCTest._expired_unary_request_stream_response
def _expired_unary_request_stream_response(self, multi_callable)
Definition: _rpc_test_helpers.py:339
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
tests.unit._rpc_test_helpers.stream_stream_multi_callable
def stream_stream_multi_callable(channel)
Definition: _rpc_test_helpers.py:224
tests.unit._rpc_test_helpers._Handler.handle_stream_stream_non_blocking
def handle_stream_stream_non_blocking(self, request_iterator, servicer_context, on_next)
Definition: _rpc_test_helpers.py:139
tests.unit._rpc_test_helpers.Callback.__call__
def __call__(self, value)
Definition: _rpc_test_helpers.py:49
tests.unit._rpc_test_helpers.BaseRPCTest._channel
_channel
Definition: _rpc_test_helpers.py:244
tests.unit._rpc_test_helpers.BaseRPCTest._consume_some_but_not_all_stream_responses_unary_request
def _consume_some_but_not_all_stream_responses_unary_request(self, multi_callable)
Definition: _rpc_test_helpers.py:258
tests.unit._rpc_test_helpers.BaseRPCTest._server
_server
Definition: _rpc_test_helpers.py:239
grpc.RpcMethodHandler
Definition: src/python/grpcio/grpc/__init__.py:1288
tests.unit._rpc_test_helpers.unary_stream_multi_callable
def unary_stream_multi_callable(channel)
Definition: _rpc_test_helpers.py:206


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:27