Skip to content

Commit ed79e25

Browse files
author
Anirav Kareddy
committed
using the @RetryingTest annotation for CI: first attempt
1 parent bb898d1 commit ed79e25

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@
134134
<scope>test</scope>
135135
</dependency>
136136

137+
<dependency>
138+
<groupId>org.junit-pioneer</groupId>
139+
<artifactId>junit-pioneer</artifactId>
140+
<version>2.3.0</version>
141+
<scope>test</scope>
142+
</dependency>
143+
137144
<dependency>
138145
<groupId>com.amazonaws</groupId>
139146
<artifactId>aws-java-sdk-kms</artifactId>

src/test/java/software/amazon/encryption/s3/S3EncryptionClientInstructionFileTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.amazonaws.services.s3.model.StaticEncryptionMaterialsProvider;
1212
import org.apache.commons.io.IOUtils;
1313
import org.junit.jupiter.api.Test;
14+
import org.junitpioneer.jupiter.RetryingTest;
1415
import software.amazon.awssdk.core.ResponseBytes;
1516
import software.amazon.awssdk.core.ResponseInputStream;
1617
import software.amazon.awssdk.core.sync.RequestBody;
@@ -309,7 +310,7 @@ public void testPutWithInstructionFileV3ToV2Rsa() throws NoSuchAlgorithmExceptio
309310
s3Client.close();
310311
}
311312

312-
@Test
313+
@RetryingTest(maxAttempts = 3)
313314
public void testMultipartPutWithInstructionFile() throws IOException {
314315
final String object_key = appendTestSuffix("test-multipart-put-instruction-file");
315316

src/test/java/software/amazon/encryption/s3/S3EncryptionClientStreamTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.bouncycastle.jce.provider.BouncyCastleProvider;
1414
import org.junit.jupiter.api.BeforeAll;
1515
import org.junit.jupiter.api.Test;
16+
import org.junitpioneer.jupiter.RetryingTest;
1617
import software.amazon.awssdk.core.ResponseBytes;
1718
import software.amazon.awssdk.core.ResponseInputStream;
1819
import software.amazon.awssdk.core.async.AsyncRequestBody;
@@ -306,7 +307,7 @@ public void failsWhenBothBufferSizeAndDelayedAuthModeEnabled() {
306307
.build());
307308
}
308309

309-
@Test
310+
@RetryingTest(maxAttempts = 3)
310311
public void customSetBufferSizeWithLargeObject() throws IOException {
311312
final String objectKey = appendTestSuffix("large-object-test-custom-buffer-size");
312313

@@ -358,7 +359,7 @@ public void customSetBufferSizeWithLargeObject() throws IOException {
358359
v3ClientWithDelayedAuth.close();
359360
}
360361

361-
@Test
362+
@RetryingTest(maxAttempts = 3)
362363
public void customSetBufferSizeWithLargeObjectAsyncClient() throws IOException {
363364
final String objectKey = appendTestSuffix("large-object-test-custom-buffer-size-async");
364365

@@ -418,7 +419,7 @@ public void customSetBufferSizeWithLargeObjectAsyncClient() throws IOException {
418419
v3ClientWithDelayedAuth.close();
419420
}
420421

421-
@Test
422+
@RetryingTest(maxAttempts = 3)
422423
public void delayedAuthModeWithLargeObject() throws IOException {
423424
final String objectKey = appendTestSuffix("large-object-test");
424425

0 commit comments

Comments
 (0)