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

Commit c33b813

Browse files
committed
sped up test
1 parent 761cf9c commit c33b813

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

google/cloud/bigtable/data/_async/metrics_interceptor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ async def response_wrapper(call):
173173
raise
174174
finally:
175175
if call is not None:
176-
_end_attempt(operation, encountered_exc, await _get_metadata(call))
176+
metadata = await _get_metadata(encountered_exc or call)
177+
_end_attempt(operation, encountered_exc, metadata)
177178

178179
try:
179180
return response_wrapper(await continuation(client_call_details, request))

tests/system/data/test_metrics_async.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ async def test_sample_row_keys_failure_timeout(
831831

832832
@CrossSync.pytest
833833
async def test_sample_row_keys_failure_mid_stream(
834-
self, table, temp_rows, handler, error_injector, cluster_config
834+
self, table, temp_rows, handler, error_injector
835835
):
836836
"""
837837
Test failure in grpc stream
@@ -851,11 +851,6 @@ async def test_sample_row_keys_failure_mid_stream(
851851
assert operation.op_type.value == "SampleRowKeys"
852852
assert operation.is_streaming is False
853853
assert len(operation.completed_attempts) == 2
854-
assert operation.cluster_id == next(iter(cluster_config.keys()))
855-
assert (
856-
operation.zone
857-
== cluster_config[operation.cluster_id].location.split("/")[-1]
858-
)
859854
# validate retried attempt
860855
attempt = handler.completed_attempts[0]
861856
assert attempt.end_status.name == "ABORTED"

0 commit comments

Comments
 (0)