Skip to content

Commit 6fe1810

Browse files
committed
Remove duplicate code
1 parent e67cc9e commit 6fe1810

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

tests/mockserver_tests/mock_server_test_base.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
start_mock_server,
2121
SpannerServicer,
2222
)
23-
from google.cloud.spanner_v1.client import Client
2423
import google.cloud.spanner_v1.types.type as spanner_type
2524
import google.cloud.spanner_v1.types.result_set as result_set
2625
from google.api_core.client_options import ClientOptions
@@ -79,27 +78,6 @@ def unavailable_status() -> _Status:
7978
return status
8079

8180

82-
# Creates an UNAVAILABLE status with the smallest possible retry delay.
83-
def unavailable_status() -> _Status:
84-
error = status_pb2.Status(
85-
code=code_pb2.UNAVAILABLE,
86-
message="Service unavailable.",
87-
)
88-
retry_info = RetryInfo(retry_delay=Duration(seconds=0, nanos=1))
89-
status = _Status(
90-
code=code_to_grpc_status_code(error.code),
91-
details=error.message,
92-
trailing_metadata=(
93-
("grpc-status-details-bin", error.SerializeToString()),
94-
(
95-
"google.rpc.retryinfo-bin",
96-
retry_info.SerializeToString(),
97-
),
98-
),
99-
)
100-
return status
101-
102-
10381
def add_error(method: str, error: status_pb2.Status):
10482
MockServerTestBase.spanner_service.mock_spanner.add_error(method, error)
10583

@@ -213,5 +191,4 @@ def database(self) -> Database:
213191
pool=FixedSizePool(size=10),
214192
enable_interceptors_in_tests=True,
215193
)
216-
print("self._database", self._database)
217194
return self._database

0 commit comments

Comments
 (0)