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

Retry whole batch of deletes on 429. #4032

Closed
wants to merge 1 commit into from
Closed
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
8 changes: 6 additions & 2 deletions storage/tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,15 @@ class TestStorageBuckets(unittest.TestCase):
def setUp(self):
self.case_buckets_to_delete = []

def tearDown(self):
def _delete_buckets(self):
with Config.CLIENT.batch():
for bucket_name in self.case_buckets_to_delete:
bucket = Config.CLIENT.bucket(bucket_name)
retry_429(bucket.delete)()
if bucket.exists():
bucket.delete()

def tearDown(self):
retry_429(self._delete_buckets)()

def test_create_bucket(self):
new_bucket_name = 'a-new-bucket' + unique_resource_id('-')
Expand Down