We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88399c2 commit 23cd2b4Copy full SHA for 23cd2b4
1 file changed
tests/integration/customizations/s3/test_plugin.py
@@ -1372,8 +1372,14 @@ def test_mb_rb(self, s3_utils):
1372
self.assert_no_errors(p)
1373
1374
def test_fail_mb_rb(self):
1375
- # Choose a bucket name that already exists.
1376
- p = aws('s3 mb s3://mybucket')
+ # S3 can intermittently return an `OperationAborted` exception instead of
+ # `BucketAlreadyExists`, so we give this test four attempts
1377
+ for i in range(4):
1378
+ # Choose a bucket name that already exists.
1379
+ p = aws('s3 mb s3://mybucket')
1380
+ if "OperationAborted" not in p.stderr:
1381
+ break
1382
+ time.sleep(2**i)
1383
assert "BucketAlreadyExists" in p.stderr
1384
assert p.rc == 1
1385
0 commit comments