Skip to content

Retry on throttle and quota errors in integ test#59

Open
Alan4506 wants to merge 1 commit into
awslabs:developfrom
Alan4506:fix-transcribe-streaming-tests
Open

Retry on throttle and quota errors in integ test#59
Alan4506 wants to merge 1 commit into
awslabs:developfrom
Alan4506:fix-transcribe-streaming-tests

Conversation

@Alan4506
Copy link
Copy Markdown
Contributor

Description of changes:

The test_get_medical_scribe_stream integration test previously only retried on BadRequestException (IAM role propagation delay). When multiple test runs execute concurrently against the same account, the test can also encounter:

  • LimitExceededException: post-stream analytics job quota exceeded
  • ThrottlingException (surfaced as CallError): concurrent streaming session limit exceeded

This change adds retry handling for both cases. The ThrottlingException is not modeled in the service's error registry, so it arrives as a generic CallError, and we match it by error id in the message string.

Testing:

Without these changes, running 20 concurrent instances of integration tests:

for i in $(seq 1 20); do python -m pytest tests/integration/ -s & done; wait

results in failures with LimitExceededException and CallError: Unknown error ... ThrottlingException. With the fix applied, 20/20 concurrent runs pass.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Alan4506 Alan4506 requested a review from a team as a code owner May 20, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant