Skip to content
Merged
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
10 changes: 8 additions & 2 deletions tests/integration/customizations/s3/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,8 +1372,14 @@ def test_mb_rb(self, s3_utils):
self.assert_no_errors(p)

def test_fail_mb_rb(self):
# Choose a bucket name that already exists.
p = aws('s3 mb s3://mybucket')
# S3 can intermittently return an `OperationAborted` exception instead of
# `BucketAlreadyExists`, so we give this test four attempts
for i in range(4):
# Choose a bucket name that already exists.
p = aws('s3 mb s3://mybucket')
if "OperationAborted" not in p.stderr:
break
time.sleep(2**i)
assert "BucketAlreadyExists" in p.stderr
assert p.rc == 1

Expand Down
Loading