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

Commit 2a42b90

Browse files
committed
fixed read_rows_sharded test
1 parent c107118 commit 2a42b90

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

tests/system/data/test_metrics_async.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -848,17 +848,19 @@ async def test_read_rows_sharded_failure_mid_stream(
848848
assert failed_op.final_status.name == "PERMISSION_DENIED"
849849
assert failed_op.op_type.value == "ReadRows"
850850
assert failed_op.is_streaming is True
851-
assert len(failed_op.completed_attempts) == 2
852-
# validate retried attempt
853-
attempt = failed_op.completed_attempts[0]
854-
assert attempt.end_status.name == "ABORTED"
855-
# validate final attempt
856-
final_attempt = failed_op.completed_attempts[-1]
857-
assert final_attempt.end_status.name == "PERMISSION_DENIED"
851+
assert len(failed_op.completed_attempts) == 1
858852
# validate successful operation
859853
assert success_op.final_status.name == "OK"
860-
assert len(success_op.completed_attempts) == 1
861-
assert success_op.completed_attempts[0].end_status.name == "OK"
854+
assert len(success_op.completed_attempts) == 2
855+
# validate failed attempt
856+
attempt = failed_op.completed_attempts[0]
857+
assert attempt.end_status.name == "PERMISSION_DENIED"
858+
# validate retried attempt
859+
retried_attempt = success_op.completed_attempts[0]
860+
assert retried_attempt.end_status.name == "ABORTED"
861+
# validate successful attempt
862+
success_attempt = success_op.completed_attempts[-1]
863+
assert success_attempt.end_status.name == "OK"
862864

863865
@CrossSync.pytest
864866
async def test_bulk_mutate_rows(self, table, temp_rows, handler, cluster_config):

0 commit comments

Comments
 (0)