|
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; |
@@ -64,7 +64,7 @@ public static void setUp() throws NoSuchAlgorithmException { |
64 | 64 | * Test AES keyring with null additionalDecryptionKeyMaterial map. |
65 | 65 | * This tests the default behavior when no additional key material is provided. |
66 | 66 | */ |
67 | | - @Test |
| 67 | + @RetryingTest(3) |
68 | 68 | public void testAesKeyringWithNullAdditionalKeyMaterial() { |
69 | 69 | final String objectKey = appendTestSuffix("aes-null-additional-key-material"); |
70 | 70 | final String input = "AES with null additional key material"; |
@@ -124,7 +124,7 @@ public void testAesKeyringWithNullAdditionalKeyMaterial() { |
124 | 124 | * Test AES keyring with empty additionalDecryptionKeyMaterial map. |
125 | 125 | * This tests the behavior when an empty map is provided. |
126 | 126 | */ |
127 | | - @Test |
| 127 | + @RetryingTest(3) |
128 | 128 | public void testAesKeyringWithEmptyAdditionalKeyMaterial() { |
129 | 129 | final String objectKey = appendTestSuffix("aes-empty-additional-key-material"); |
130 | 130 | final String input = "AES with empty additional key material"; |
@@ -185,7 +185,7 @@ public void testAesKeyringWithEmptyAdditionalKeyMaterial() { |
185 | 185 | * Test AES keyring with a singleton additionalDecryptionKeyMaterial map. |
186 | 186 | * This tests the behavior when a single additional key material is provided. |
187 | 187 | */ |
188 | | - @Test |
| 188 | + @RetryingTest(3) |
189 | 189 | public void testAesKeyringWithSingletonAdditionalKeyMaterial() { |
190 | 190 | final String objectKey = appendTestSuffix("aes-singleton-additional-key-material"); |
191 | 191 | final String input = "AES with singleton additional key material"; |
@@ -252,7 +252,7 @@ public void testAesKeyringWithSingletonAdditionalKeyMaterial() { |
252 | 252 | * Test AES keyring with multiple entries in the additionalDecryptionKeyMaterial map. |
253 | 253 | * This tests the behavior when multiple additional key materials are provided. |
254 | 254 | */ |
255 | | - @Test |
| 255 | + @RetryingTest(3) |
256 | 256 | public void testAesKeyringWithMultipleAdditionalKeyMaterials() { |
257 | 257 | final String objectKey = appendTestSuffix("aes-multiple-additional-key-materials"); |
258 | 258 | final String input = "AES with multiple additional key materials"; |
@@ -331,7 +331,7 @@ public void testAesKeyringWithMultipleAdditionalKeyMaterials() { |
331 | 331 | * Test AES keyring with additionalDecryptionKeyMaterial that doesn't match. |
332 | 332 | * This tests the behavior when no matching key material is found and it should fall back to the default key. |
333 | 333 | */ |
334 | | - @Test |
| 334 | + @RetryingTest(3) |
335 | 335 | public void testAesKeyringWithNonMatchingAdditionalKeyMaterial() { |
336 | 336 | final String objectKey = appendTestSuffix("aes-non-matching-additional-key-material"); |
337 | 337 | final String input = "AES with non-matching additional key material"; |
@@ -402,7 +402,7 @@ public void testAesKeyringWithNonMatchingAdditionalKeyMaterial() { |
402 | 402 | * Test AES keyring with additionalDecryptionKeyMaterial that doesn't match and a wrong default key. |
403 | 403 | * This tests the behavior when no matching key material is found and the default key is also wrong. |
404 | 404 | */ |
405 | | - @Test |
| 405 | + @RetryingTest(3) |
406 | 406 | public void testAesKeyringWithNonMatchingAdditionalKeyMaterialAndWrongDefaultKey() { |
407 | 407 | final String objectKey = appendTestSuffix("aes-non-matching-additional-key-material-wrong-default"); |
408 | 408 | final String input = "AES with non-matching additional key material and wrong default key"; |
@@ -469,7 +469,7 @@ public void testAesKeyringWithNonMatchingAdditionalKeyMaterialAndWrongDefaultKey |
469 | 469 | * Test RSA keyring with null additionalDecryptionKeyMaterial map. |
470 | 470 | * This tests the default behavior when no additional key material is provided. |
471 | 471 | */ |
472 | | - @Test |
| 472 | + @RetryingTest(3) |
473 | 473 | public void testRsaKeyringWithNullAdditionalKeyMaterial() { |
474 | 474 | final String objectKey = appendTestSuffix("rsa-null-additional-key-material"); |
475 | 475 | final String input = "RSA with null additional key material"; |
@@ -535,7 +535,7 @@ public void testRsaKeyringWithNullAdditionalKeyMaterial() { |
535 | 535 | * Test RSA keyring with empty additionalDecryptionKeyMaterial map. |
536 | 536 | * This tests the behavior when an empty map is provided. |
537 | 537 | */ |
538 | | - @Test |
| 538 | + @RetryingTest(3) |
539 | 539 | public void testRsaKeyringWithEmptyAdditionalKeyMaterial() { |
540 | 540 | final String objectKey = appendTestSuffix("rsa-empty-additional-key-material"); |
541 | 541 | final String input = "RSA with empty additional key material"; |
@@ -602,7 +602,7 @@ public void testRsaKeyringWithEmptyAdditionalKeyMaterial() { |
602 | 602 | * Test RSA keyring with a singleton additionalDecryptionKeyMaterial map. |
603 | 603 | * This tests the behavior when a single additional key material is provided. |
604 | 604 | */ |
605 | | - @Test |
| 605 | + @RetryingTest(3) |
606 | 606 | public void testRsaKeyringWithSingletonAdditionalKeyMaterial() { |
607 | 607 | final String objectKey = appendTestSuffix("rsa-singleton-additional-key-material"); |
608 | 608 | final String input = "RSA with singleton additional key material"; |
@@ -678,7 +678,7 @@ public void testRsaKeyringWithSingletonAdditionalKeyMaterial() { |
678 | 678 | * Test RSA keyring with multiple entries in the additionalDecryptionKeyMaterial map. |
679 | 679 | * This tests the behavior when multiple additional key materials are provided. |
680 | 680 | */ |
681 | | - @Test |
| 681 | + @RetryingTest(3) |
682 | 682 | public void testRsaKeyringWithMultipleAdditionalKeyMaterials() { |
683 | 683 | final String objectKey = appendTestSuffix("rsa-multiple-additional-key-materials"); |
684 | 684 | final String input = "RSA with multiple additional key materials"; |
@@ -769,7 +769,7 @@ public void testRsaKeyringWithMultipleAdditionalKeyMaterials() { |
769 | 769 | * Test RSA keyring with additionalDecryptionKeyMaterial that doesn't match. |
770 | 770 | * This tests the behavior when no matching key material is found and it should fall back to the default key. |
771 | 771 | */ |
772 | | - @Test |
| 772 | + @RetryingTest(3) |
773 | 773 | public void testRsaKeyringWithNonMatchingAdditionalKeyMaterial() { |
774 | 774 | final String objectKey = appendTestSuffix("rsa-non-matching-additional-key-material"); |
775 | 775 | final String input = "RSA with non-matching additional key material"; |
@@ -849,7 +849,7 @@ public void testRsaKeyringWithNonMatchingAdditionalKeyMaterial() { |
849 | 849 | * Test RSA keyring with additionalDecryptionKeyMaterial that doesn't match and a wrong default key. |
850 | 850 | * This tests the behavior when no matching key material is found and the default key is also wrong. |
851 | 851 | */ |
852 | | - @Test |
| 852 | + @RetryingTest(3) |
853 | 853 | public void testRsaKeyringWithNonMatchingAdditionalKeyMaterialAndWrongDefaultKey() { |
854 | 854 | final String objectKey = appendTestSuffix("rsa-non-matching-additional-key-material-wrong-default"); |
855 | 855 | final String input = "RSA with non-matching additional key material and wrong default key"; |
|
0 commit comments