Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Jan 29, 2024
1 parent 89d0e7d commit 2f6f9d7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
8 changes: 6 additions & 2 deletions google/cloud/spanner_v1/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,13 @@ def execute_sql(
if self._transaction_id is None:
# lock is added to handle the inline begin for first rpc
with self._lock:
return self._get_streamed_result_set(restart, request, trace_attributes, column_info)
return self._get_streamed_result_set(
restart, request, trace_attributes, column_info
)
else:
return self._get_streamed_result_set(restart, request, trace_attributes, column_info)
return self._get_streamed_result_set(
restart, request, trace_attributes, column_info
)

def _get_streamed_result_set(self, restart, request, trace_attributes, column_info):
iterator = _restart_on_unavailable(
Expand Down
16 changes: 13 additions & 3 deletions tests/system/test_database_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,11 @@ def test_update_ddl_w_default_leader_success(


def test_create_role_grant_access_success(
not_emulator, shared_instance, databases_to_delete, database_dialect, proto_descriptor_file,
not_emulator,
shared_instance,
databases_to_delete,
database_dialect,
proto_descriptor_file,
):
creator_role_parent = _helpers.unique_id("role_parent", separator="_")
creator_role_orphan = _helpers.unique_id("role_orphan", separator="_")
Expand All @@ -469,7 +473,9 @@ def test_create_role_grant_access_success(
f"GRANT SELECT ON TABLE contacts TO {creator_role_parent}",
]

operation = temp_db.update_ddl(ddl_statements, proto_descriptors=proto_descriptor_file)
operation = temp_db.update_ddl(
ddl_statements, proto_descriptors=proto_descriptor_file
)
operation.result(DBAPI_OPERATION_TIMEOUT) # raises on failure / timeout.

# Perform select with orphan role on table contacts.
Expand Down Expand Up @@ -504,7 +510,11 @@ def test_create_role_grant_access_success(


def test_list_database_role_success(
not_emulator, shared_instance, databases_to_delete, database_dialect, proto_descriptor_file
not_emulator,
shared_instance,
databases_to_delete,
database_dialect,
proto_descriptor_file,
):
creator_role_parent = _helpers.unique_id("role_parent", separator="_")
creator_role_orphan = _helpers.unique_id("role_orphan", separator="_")
Expand Down
1 change: 0 additions & 1 deletion tests/system/test_session_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,6 @@ def _unit_of_work(transaction):


def _set_up_proto_table(database):

sd = _sample_data

def _unit_of_work(transaction):
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ def test_default_leader(self):
self.assertEqual(database.default_leader, default_leader)

def test_proto_descriptors(self):

instance = _Instance(self.INSTANCE_NAME)
pool = _Pool()
database = self._make_one(
Expand Down

0 comments on commit 2f6f9d7

Please sign in to comment.