Skip to content

Commit

Permalink
Adjust Spanner tests for grpcio 1.2.0 (#3178)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukesneeringer authored Mar 21, 2017
1 parent 7876d65 commit 10f5520
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spanner/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

REQUIREMENTS = [
'google-cloud-core >= 0.23.1, < 0.24dev',
'grpcio >= 1.0.2, < 2.0dev',
'grpcio >= 1.2.0, < 2.0dev',
'gapic-google-cloud-spanner-v1 >= 0.15.0, < 0.16dev',
'gapic-google-cloud-spanner-admin-database-v1 >= 0.15.0, < 0.16dev',
'gapic-google-cloud-spanner-admin-instance-v1 >= 0.15.0, < 0.16dev',
Expand Down
6 changes: 3 additions & 3 deletions spanner/unit_tests/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,15 +847,15 @@ def begin_transaction(self, session, options_, options=None):
def _trailing_metadata(self):
from google.protobuf.duration_pb2 import Duration
from google.rpc.error_details_pb2 import RetryInfo
from grpc._common import cygrpc_metadata
from grpc._common import to_cygrpc_metadata

if self._commit_abort_retry_nanos is None:
return cygrpc_metadata(())
return to_cygrpc_metadata(())
retry_info = RetryInfo(
retry_delay=Duration(
seconds=self._commit_abort_retry_seconds,
nanos=self._commit_abort_retry_nanos))
return cygrpc_metadata([
return to_cygrpc_metadata([
('google.rpc.retryinfo-bin', retry_info.SerializeToString())])

def commit(self, session, mutations,
Expand Down

0 comments on commit 10f5520

Please sign in to comment.