diff options
author | Masood Malekghassemi <soltanmm@users.noreply.github.com> | 2015-06-29 15:06:08 -0700 |
---|---|---|
committer | Masood Malekghassemi <soltanmm@users.noreply.github.com> | 2015-06-29 15:06:08 -0700 |
commit | a6cfa0ad3b1bbed9aae1836f3c0ab0cb1bf581d9 (patch) | |
tree | aaf32cb67cd2a0f74bdce9c09c7a513a07e2c132 | |
parent | a6de02f5ef15646c12f495f11c410326d34e5dfe (diff) |
Fix #2248
-rw-r--r-- | src/python/src/grpc/_adapter/_intermediary_low.py | 3 | ||||
-rw-r--r-- | src/python/src/grpc/_adapter/_intermediary_low_test.py | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/python/src/grpc/_adapter/_intermediary_low.py b/src/python/src/grpc/_adapter/_intermediary_low.py index 6b96aef1d3..3c7f0a2619 100644 --- a/src/python/src/grpc/_adapter/_intermediary_low.py +++ b/src/python/src/grpc/_adapter/_intermediary_low.py @@ -144,10 +144,11 @@ class Call(object): self._metadata.append((key, value)) def premetadata(self): - return self._internal.start_batch([ + result = self._internal.start_batch([ _types.OpArgs.send_initial_metadata(self._metadata) ], _IGNORE_ME_TAG) self._metadata = [] + return result def read(self, tag): return self._internal.start_batch([ diff --git a/src/python/src/grpc/_adapter/_intermediary_low_test.py b/src/python/src/grpc/_adapter/_intermediary_low_test.py index 1a9b0c69f3..27a5b82e9c 100644 --- a/src/python/src/grpc/_adapter/_intermediary_low_test.py +++ b/src/python/src/grpc/_adapter/_intermediary_low_test.py @@ -282,6 +282,9 @@ class EchoTest(unittest.TestCase): self.assertIn(server_trailing_binary_metadata_key, metadata) self.assertEqual(server_trailing_binary_metadata_value, metadata[server_trailing_binary_metadata_key]) + self.assertSetEqual(set(key for key, _ in finish_accepted.metadata), + set((server_trailing_metadata_key, + server_trailing_binary_metadata_key,))) server_timeout_none_event = self.server_completion_queue.get(0) self.assertIsNone(server_timeout_none_event) |