Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 131a77f

Browse files
authored
tests: add retry for 400 from 'Bucket.update' after removing labels (googleapis#550)
Closes googleapis#541
1 parent 6eff22d commit 131a77f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/system/test_bucket.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ def test_bucket_update_labels(storage_client, buckets_to_delete):
111111
assert bucket.labels == new_labels
112112

113113
bucket.labels = {}
114-
bucket.update()
114+
# See https://github.com/googleapis/python-storage/issues/541
115+
retry_400 = _helpers.RetryErrors(exceptions.BadRequest)
116+
retry_400(bucket.update)()
115117
assert bucket.labels == {}
116118

117119

0 commit comments

Comments
 (0)