diff --git a/tests/system/test_retry.py b/tests/system/test_retry.py index 0d2f941090..d649cbabd3 100644 --- a/tests/system/test_retry.py +++ b/tests/system/test_retry.py @@ -20,7 +20,8 @@ def test_retry_bubble(echo): - with pytest.raises(exceptions.GatewayTimeout): + # Note: DeadlineExceeded is from gRPC, GatewayTimeout from http + with pytest.raises((exceptions.DeadlineExceeded, exceptions.GatewayTimeout)): echo.echo({ 'error': { 'code': code_pb2.Code.Value('DEADLINE_EXCEEDED'), diff --git a/tests/system/test_unary.py b/tests/system/test_unary.py index bc72f352af..076771ed30 100644 --- a/tests/system/test_unary.py +++ b/tests/system/test_unary.py @@ -37,8 +37,9 @@ def test_unary_with_dict(echo): def test_unary_error(echo): message = 'Bad things! Bad things!' - # Note: InvalidArgument is from gRPC, InternalServerError from http - with pytest.raises(exceptions.BadRequest) as exc: + # Note: InvalidArgument is from gRPC, BadRequest from http (no MTLS), InternalServerError from http (MTLS) + # TODO: Reduce number of different exception types here. + with pytest.raises((exceptions.InvalidArgument, exceptions.BadRequest, exceptions.InternalServerError)) as exc: echo.echo({ 'error': { 'code': code_pb2.Code.Value('INVALID_ARGUMENT'),