Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storage] Another fix to flaky retry test #25940

Merged
merged 2 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sdk/storage/azure-storage-blob/tests/test_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ def test_retry_on_socket_timeout(self, **kwargs):
assert 'read timeout' in str(error.value.args[0]), 'Expected socket timeout but got different exception.'

finally:
# we must make the timeout normal again to let the delete operation succeed
service.delete_container(container_name, connection_timeout=(11, 11))
# Recreate client with normal timeouts
service = self._create_storage_service(BlobServiceClient, storage_account_name, storage_account_key)
service.delete_container(container_name)

@BlobPreparer()
@recorded_by_proxy
Expand Down
5 changes: 3 additions & 2 deletions sdk/storage/azure-storage-blob/tests/test_retry_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ async def test_retry_on_socket_timeout(self, **kwargs):
assert 'Timeout on reading data from socket' in str(error.value.args[0]), 'Expected socket timeout but got different exception.'

finally:
# we must make the timeout normal again to let the delete operation succeed
await service.delete_container(container_name, connection_timeout=11, read_timeout=11)
# Recreate client with normal timeouts
service = self._create_storage_service(BlobServiceClient, storage_account_name, storage_account_key)
service.delete_container(container_name)

@BlobPreparer()
@recorded_by_proxy_async
Expand Down