From bed7b993cf102748c235b4e591727b174e94f8fe Mon Sep 17 00:00:00 2001 From: SamRemis Date: Wed, 22 Apr 2026 09:30:07 -0400 Subject: [PATCH 1/4] Add retries to test_fail_mb_rb --- tests/integration/customizations/s3/test_plugin.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/integration/customizations/s3/test_plugin.py b/tests/integration/customizations/s3/test_plugin.py index 0536bb1d179a..971e6f45ff29 100644 --- a/tests/integration/customizations/s3/test_plugin.py +++ b/tests/integration/customizations/s3/test_plugin.py @@ -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 intermittenly return an `OperationAborted` exception instead of + # `BucketAlreadyExists`, so we give this test three attempts + for _ in range(3): + # Choose a bucket name that already exists. + p = aws('s3 mb s3://mybucket') + if "BucketAlreadyExists" in p.stderr: + break + time.sleep(1) assert "BucketAlreadyExists" in p.stderr assert p.rc == 1 From af1066630fd326f4c47bb8cacf3ad8ecfb8f160e Mon Sep 17 00:00:00 2001 From: SamRemis Date: Wed, 22 Apr 2026 14:00:20 -0400 Subject: [PATCH 2/4] Update test_plugin.py --- tests/integration/customizations/s3/test_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/customizations/s3/test_plugin.py b/tests/integration/customizations/s3/test_plugin.py index 971e6f45ff29..92e8e53574ad 100644 --- a/tests/integration/customizations/s3/test_plugin.py +++ b/tests/integration/customizations/s3/test_plugin.py @@ -1374,12 +1374,12 @@ def test_mb_rb(self, s3_utils): def test_fail_mb_rb(self): #S3 can intermittenly return an `OperationAborted` exception instead of # `BucketAlreadyExists`, so we give this test three attempts - for _ in range(3): + for i in range(4): # Choose a bucket name that already exists. p = aws('s3 mb s3://mybucket') if "BucketAlreadyExists" in p.stderr: break - time.sleep(1) + time.sleep(2**i) assert "BucketAlreadyExists" in p.stderr assert p.rc == 1 From 89a27ce01a330aa06bbc0260fab6d14251d085e7 Mon Sep 17 00:00:00 2001 From: SamRemis Date: Wed, 22 Apr 2026 14:15:38 -0400 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: jonathan343 <43360731+jonathan343@users.noreply.github.com> --- tests/integration/customizations/s3/test_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/customizations/s3/test_plugin.py b/tests/integration/customizations/s3/test_plugin.py index 92e8e53574ad..74eed135989c 100644 --- a/tests/integration/customizations/s3/test_plugin.py +++ b/tests/integration/customizations/s3/test_plugin.py @@ -1372,8 +1372,8 @@ def test_mb_rb(self, s3_utils): self.assert_no_errors(p) def test_fail_mb_rb(self): - #S3 can intermittenly return an `OperationAborted` exception instead of - # `BucketAlreadyExists`, so we give this test three attempts + # 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') From a0e7b1dbebae3b63dfef37fc437bfed8c5f14a45 Mon Sep 17 00:00:00 2001 From: SamRemis Date: Thu, 23 Apr 2026 11:48:19 -0400 Subject: [PATCH 4/4] Update test_plugin.py --- tests/integration/customizations/s3/test_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/customizations/s3/test_plugin.py b/tests/integration/customizations/s3/test_plugin.py index 74eed135989c..313977b4e315 100644 --- a/tests/integration/customizations/s3/test_plugin.py +++ b/tests/integration/customizations/s3/test_plugin.py @@ -1377,7 +1377,7 @@ def test_fail_mb_rb(self): for i in range(4): # Choose a bucket name that already exists. p = aws('s3 mb s3://mybucket') - if "BucketAlreadyExists" in p.stderr: + if "OperationAborted" not in p.stderr: break time.sleep(2**i) assert "BucketAlreadyExists" in p.stderr