aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_test/grpc_test
diff options
context:
space:
mode:
authorGravatar Nathaniel Manista <nathaniel@google.com>2015-08-31 21:29:12 +0000
committerGravatar Nathaniel Manista <nathaniel@google.com>2015-08-31 21:29:12 +0000
commit65ad41f53b1d230cfdcb33f9e111b9a1358a1bbb (patch)
tree0797f12faa342e725d58a05af02bcf32ed4357d1 /src/python/grpcio_test/grpc_test
parentc059c984614425c6327818eba482e7c8d608d6d5 (diff)
Fixes for bugs found during manual use
(1) In _ingestion, it's the "details" attribute of a NoSuchMethodException that we want. The "message" is inherited from the base Exception class. (2) In _transmission, use a proper sum type for representing operation abortion. Trying to overload the existing _completion value for status-and-details-when-aborting was trying to be too clever. (3) In _calls... oof. Just look. Oof. Test coverage for this code path is added. (4) In _service, the application-provided face.MultiMethodImplementation isn't directly callable, but rather exposes a method named "service". (5) In crust.implementations, the wrapping that we've put around the application-provided face.MultiMethodImplementation *is* directly callable, and *does not* expose a method named "service". (6) Also in crust.implementations, base.NoSuchMethodError's constructor takes a code value and a details value. (7) Again in crust.implementations, the application-provided face.MultiMethodImplementation may be None, and if it is None, we shouldn't wrap it with an adaptation function that would only raise a TypeError at a later time.
Diffstat (limited to 'src/python/grpcio_test/grpc_test')
-rw-r--r--src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py b/src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py
index b7dd5d4d17..2d2a081955 100644
--- a/src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py
+++ b/src/python/grpcio_test/grpc_test/framework/interfaces/face/_blocking_invocation_inline_service.py
@@ -82,8 +82,8 @@ class TestCase(test_coverage.Coverage, unittest.TestCase):
for test_messages in test_messages_sequence:
request = test_messages.request()
- response = self._invoker.blocking(group, method)(
- request, test_constants.LONG_TIMEOUT)
+ response, call = self._invoker.blocking(group, method)(
+ request, test_constants.LONG_TIMEOUT, with_call=True)
test_messages.verify(request, response, self)
@@ -105,8 +105,8 @@ class TestCase(test_coverage.Coverage, unittest.TestCase):
for test_messages in test_messages_sequence:
requests = test_messages.requests()
- response = self._invoker.blocking(group, method)(
- iter(requests), test_constants.LONG_TIMEOUT)
+ response, call = self._invoker.blocking(group, method)(
+ iter(requests), test_constants.LONG_TIMEOUT, with_call=True)
test_messages.verify(requests, response, self)