|
3 | 3 | package software.amazon.encryption.s3; |
4 | 4 |
|
5 | 5 | import org.junit.jupiter.api.BeforeAll; |
6 | | -import org.junit.jupiter.api.Test; |
| 6 | +import org.junitpioneer.jupiter.RetryingTest; |
7 | 7 | import software.amazon.awssdk.core.ResponseBytes; |
8 | 8 | import software.amazon.awssdk.core.sync.RequestBody; |
9 | 9 | import software.amazon.awssdk.services.s3.S3Client; |
@@ -65,7 +65,7 @@ public static void setUp() throws NoSuchAlgorithmException { |
65 | 65 | * Test AES keyring with null additionalDecryptionKeyMaterial map. |
66 | 66 | * This tests the default behavior when no additional key material is provided. |
67 | 67 | */ |
68 | | - @Test |
| 68 | + @RetryingTest(3) |
69 | 69 | public void testAesKeyringWithNullAdditionalKeyMaterial() { |
70 | 70 | final String objectKey = appendTestSuffix("aes-null-additional-key-material"); |
71 | 71 | final String input = "AES with null additional key material"; |
@@ -129,7 +129,7 @@ public void testAesKeyringWithNullAdditionalKeyMaterial() { |
129 | 129 | * Test AES keyring with empty additionalDecryptionKeyMaterial map. |
130 | 130 | * This tests the behavior when an empty map is provided. |
131 | 131 | */ |
132 | | - @Test |
| 132 | + @RetryingTest(3) |
133 | 133 | public void testAesKeyringWithEmptyAdditionalKeyMaterial() { |
134 | 134 | final String objectKey = appendTestSuffix("aes-empty-additional-key-material"); |
135 | 135 | final String input = "AES with empty additional key material"; |
@@ -194,7 +194,7 @@ public void testAesKeyringWithEmptyAdditionalKeyMaterial() { |
194 | 194 | * Test AES keyring with a singleton additionalDecryptionKeyMaterial map. |
195 | 195 | * This tests the behavior when a single additional key material is provided. |
196 | 196 | */ |
197 | | - @Test |
| 197 | + @RetryingTest(3) |
198 | 198 | public void testAesKeyringWithSingletonAdditionalKeyMaterial() { |
199 | 199 | final String objectKey = appendTestSuffix("aes-singleton-additional-key-material"); |
200 | 200 | final String input = "AES with singleton additional key material"; |
@@ -265,7 +265,7 @@ public void testAesKeyringWithSingletonAdditionalKeyMaterial() { |
265 | 265 | * Test AES keyring with multiple entries in the additionalDecryptionKeyMaterial map. |
266 | 266 | * This tests the behavior when multiple additional key materials are provided. |
267 | 267 | */ |
268 | | - @Test |
| 268 | + @RetryingTest(3) |
269 | 269 | public void testAesKeyringWithMultipleAdditionalKeyMaterials() { |
270 | 270 | final String objectKey = appendTestSuffix("aes-multiple-additional-key-materials"); |
271 | 271 | final String input = "AES with multiple additional key materials"; |
@@ -348,7 +348,7 @@ public void testAesKeyringWithMultipleAdditionalKeyMaterials() { |
348 | 348 | * Test AES keyring with additionalDecryptionKeyMaterial that doesn't match. |
349 | 349 | * This tests the behavior when no matching key material is found and it should fall back to the default key. |
350 | 350 | */ |
351 | | - @Test |
| 351 | + @RetryingTest(3) |
352 | 352 | public void testAesKeyringWithNonMatchingAdditionalKeyMaterial() { |
353 | 353 | final String objectKey = appendTestSuffix("aes-non-matching-additional-key-material"); |
354 | 354 | final String input = "AES with non-matching additional key material"; |
@@ -423,7 +423,7 @@ public void testAesKeyringWithNonMatchingAdditionalKeyMaterial() { |
423 | 423 | * Test AES keyring with additionalDecryptionKeyMaterial that doesn't match and a wrong default key. |
424 | 424 | * This tests the behavior when no matching key material is found and the default key is also wrong. |
425 | 425 | */ |
426 | | - @Test |
| 426 | + @RetryingTest(3) |
427 | 427 | public void testAesKeyringWithNonMatchingAdditionalKeyMaterialAndWrongDefaultKey() { |
428 | 428 | final String objectKey = appendTestSuffix("aes-non-matching-additional-key-material-wrong-default"); |
429 | 429 | final String input = "AES with non-matching additional key material and wrong default key"; |
@@ -494,7 +494,7 @@ public void testAesKeyringWithNonMatchingAdditionalKeyMaterialAndWrongDefaultKey |
494 | 494 | * Test RSA keyring with null additionalDecryptionKeyMaterial map. |
495 | 495 | * This tests the default behavior when no additional key material is provided. |
496 | 496 | */ |
497 | | - @Test |
| 497 | + @RetryingTest(3) |
498 | 498 | public void testRsaKeyringWithNullAdditionalKeyMaterial() { |
499 | 499 | final String objectKey = appendTestSuffix("rsa-null-additional-key-material"); |
500 | 500 | final String input = "RSA with null additional key material"; |
@@ -564,7 +564,7 @@ public void testRsaKeyringWithNullAdditionalKeyMaterial() { |
564 | 564 | * Test RSA keyring with empty additionalDecryptionKeyMaterial map. |
565 | 565 | * This tests the behavior when an empty map is provided. |
566 | 566 | */ |
567 | | - @Test |
| 567 | + @RetryingTest(3) |
568 | 568 | public void testRsaKeyringWithEmptyAdditionalKeyMaterial() { |
569 | 569 | final String objectKey = appendTestSuffix("rsa-empty-additional-key-material"); |
570 | 570 | final String input = "RSA with empty additional key material"; |
@@ -635,7 +635,7 @@ public void testRsaKeyringWithEmptyAdditionalKeyMaterial() { |
635 | 635 | * Test RSA keyring with a singleton additionalDecryptionKeyMaterial map. |
636 | 636 | * This tests the behavior when a single additional key material is provided. |
637 | 637 | */ |
638 | | - @Test |
| 638 | + @RetryingTest(3) |
639 | 639 | public void testRsaKeyringWithSingletonAdditionalKeyMaterial() { |
640 | 640 | final String objectKey = appendTestSuffix("rsa-singleton-additional-key-material"); |
641 | 641 | final String input = "RSA with singleton additional key material"; |
@@ -715,7 +715,7 @@ public void testRsaKeyringWithSingletonAdditionalKeyMaterial() { |
715 | 715 | * Test RSA keyring with multiple entries in the additionalDecryptionKeyMaterial map. |
716 | 716 | * This tests the behavior when multiple additional key materials are provided. |
717 | 717 | */ |
718 | | - @Test |
| 718 | + @RetryingTest(3) |
719 | 719 | public void testRsaKeyringWithMultipleAdditionalKeyMaterials() { |
720 | 720 | final String objectKey = appendTestSuffix("rsa-multiple-additional-key-materials"); |
721 | 721 | final String input = "RSA with multiple additional key materials"; |
@@ -810,7 +810,7 @@ public void testRsaKeyringWithMultipleAdditionalKeyMaterials() { |
810 | 810 | * Test RSA keyring with additionalDecryptionKeyMaterial that doesn't match. |
811 | 811 | * This tests the behavior when no matching key material is found and it should fall back to the default key. |
812 | 812 | */ |
813 | | - @Test |
| 813 | + @RetryingTest(3) |
814 | 814 | public void testRsaKeyringWithNonMatchingAdditionalKeyMaterial() { |
815 | 815 | final String objectKey = appendTestSuffix("rsa-non-matching-additional-key-material"); |
816 | 816 | final String input = "RSA with non-matching additional key material"; |
@@ -894,7 +894,7 @@ public void testRsaKeyringWithNonMatchingAdditionalKeyMaterial() { |
894 | 894 | * Test RSA keyring with additionalDecryptionKeyMaterial that doesn't match and a wrong default key. |
895 | 895 | * This tests the behavior when no matching key material is found and the default key is also wrong. |
896 | 896 | */ |
897 | | - @Test |
| 897 | + @RetryingTest(3) |
898 | 898 | public void testRsaKeyringWithNonMatchingAdditionalKeyMaterialAndWrongDefaultKey() { |
899 | 899 | final String objectKey = appendTestSuffix("rsa-non-matching-additional-key-material-wrong-default"); |
900 | 900 | final String input = "RSA with non-matching additional key material and wrong default key"; |
|
0 commit comments