aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/grpcio_tests/tests/unit/_invocation_defects_test.py')
-rw-r--r--src/python/grpcio_tests/tests/unit/_invocation_defects_test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py b/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py
index e40cca8b24..93a5fdf9ff 100644
--- a/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py
+++ b/src/python/grpcio_tests/tests/unit/_invocation_defects_test.py
@@ -165,11 +165,13 @@ class FailAfterFewIterationsCounter(object):
def __next__(self):
if self._current >= self._high:
- raise Exception("This is a deliberate failure in a unit test.")
+ raise test_control.Defect()
else:
self._current += 1
return self._bytestring
+ next = __next__
+
def _unary_unary_multi_callable(channel):
return channel.unary_unary(_UNARY_UNARY)