File tree Expand file tree Collapse file tree
tests/integration/customizations/s3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1310,10 +1310,17 @@ def test_mb_rb(self):
13101310 self .assert_no_errors (p )
13111311
13121312 def test_fail_mb_rb (self ):
1313- # Choose a bucket name that already exists.
1314- p = aws ('s3 mb s3://mybucket' )
1315- self .assertIn ("BucketAlreadyExists" , p .stderr )
1316- self .assertEqual (p .rc , 1 )
1313+ #S3 can intermittenly return an `OperationAborted` exception instead of
1314+ # `BucketAlreadyExists`, so we give this test three attempts
1315+ for i in range (4 ):
1316+ # Choose a bucket name that already exists.
1317+ p = aws ('s3 mb s3://mybucket' )
1318+ if "BucketAlreadyExists" in p .stderr :
1319+ break
1320+ time .sleep (2 ** i )
1321+ assert "BucketAlreadyExists" in p .stderr
1322+ assert p .rc == 1
1323+
13171324
13181325
13191326class TestOutput (BaseS3IntegrationTest ):
You can’t perform that action at this time.
0 commit comments