pull/20753/head
Richard Belleville 5 years ago
parent 3411202598
commit 0dd70ff758
  1. 2
      src/python/grpcio/grpc/_channel.py
  2. 4
      src/python/grpcio_tests/tests/unit/_metadata_test.py

@ -331,6 +331,8 @@ class _SingleThreadedRendezvous(grpc.RpcError, grpc.Call): # pylint: disable=to
_common.wait(self._state.condition.wait, _done) _common.wait(self._state.condition.wait, _done)
return self._state.trailing_metadata return self._state.trailing_metadata
# TODO(https://github.com/grpc/grpc/issues/20763): Drive RPC progress using
# the calling thread.
def code(self): def code(self):
"""See grpc.Call.code""" """See grpc.Call.code"""
with self._state.condition: with self._state.condition:

@ -202,8 +202,8 @@ class MetadataTest(unittest.TestCase):
def testUnaryStream(self): def testUnaryStream(self):
multi_callable = self._channel.unary_stream(_UNARY_STREAM) multi_callable = self._channel.unary_stream(_UNARY_STREAM)
call = multi_callable(_REQUEST, metadata=_INVOCATION_METADATA) call = multi_callable(_REQUEST, metadata=_INVOCATION_METADATA)
# NOTE(gnossen): In the single-threaded case, we must consume at least # TODO(https://github.com/grpc/grpc/issues/20762): Make the call to
# one message before the initial metadata will show up. # `next()` unnecessary.
next(call) next(call)
self.assertTrue( self.assertTrue(
test_common.metadata_transmitted(_EXPECTED_INITIAL_METADATA, test_common.metadata_transmitted(_EXPECTED_INITIAL_METADATA,

Loading…
Cancel
Save