Skip to content

Commit

Permalink
Remove use of batch when cleaning up buckets. (#4102)
Browse files Browse the repository at this point in the history
Allows 429 errors to be handled by retry.

See:
googleapis/google-cloud-python#4032 (comment)
  • Loading branch information
tseaver authored and cojenco committed Oct 13, 2021
1 parent e4ae37a commit 45cbc46
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,9 @@ def setUp(self):
self.case_buckets_to_delete = []

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

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

0 comments on commit 45cbc46

Please sign in to comment.