Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit 4ac9fef

Browse files
committed
Fix mismatched properties for checking grpc exceptions
1 parent 5d26f90 commit 4ac9fef

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tests/mockserver_tests/mock_server_test_base.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def aborted_status() -> _Status:
6161
def unavailable_status() -> _Status:
6262
error = status_pb2.Status(
6363
code=code_pb2.UNAVAILABLE,
64-
message="Received unexpected EOS on DATA frame from server",
64+
message="Service unavailable.",
6565
)
6666
retry_info = RetryInfo(retry_delay=Duration(seconds=0, nanos=1))
6767
status = _Status(
@@ -78,22 +78,17 @@ def unavailable_status() -> _Status:
7878
return status
7979

8080

81-
# Creates an INTERNAL status with the smallest possible retry delay.
81+
# Creates an INTERNAL status.
8282
def internal_status() -> _Status:
8383
error = status_pb2.Status(
8484
code=code_pb2.INTERNAL,
85-
message="Service unavailable.",
85+
message="Received unexpected EOS on DATA frame from server",
8686
)
87-
retry_info = RetryInfo(retry_delay=Duration(seconds=0, nanos=1))
8887
status = _Status(
8988
code=code_to_grpc_status_code(error.code),
9089
details=error.message,
9190
trailing_metadata=(
9291
("grpc-status-details-bin", error.SerializeToString()),
93-
(
94-
"google.rpc.retryinfo-bin",
95-
retry_info.SerializeToString(),
96-
),
9792
),
9893
)
9994
return status

0 commit comments

Comments
 (0)