Skip to content

Commit

Permalink
Updated Guava version, added backoff for ShardSync Integ test, and re…
Browse files Browse the repository at this point in the history
…introduced SNAPSHOT version (#1214)

* Updated guava version to 32.1.1 and added backoff logic for ShardSync Integration test

* Added back snapshot version classifier

---------

Co-authored-by: Brendan Lynch <[email protected]>
  • Loading branch information
brendan-p-lynch and Brendan Lynch authored Oct 11, 2023
1 parent 1e6506c commit e731486
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<artifactId>amazon-kinesis-client</artifactId>
<packaging>jar</packaging>
<name>Amazon Kinesis Client Library for Java</name>
<version>1.15.0</version>
<version>1.15.1-SNAPSHOT</version>
<description>The Amazon Kinesis Client Library for Java enables Java developers to easily consume and process data
from Amazon Kinesis.
</description>
Expand Down Expand Up @@ -55,7 +55,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.0.1-jre</version>
<version>32.1.1-jre</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import com.amazonaws.services.kinesis.leases.impl.KinesisClientLeaseManager;
import com.amazonaws.services.kinesis.leases.interfaces.IKinesisClientLeaseManager;
import com.amazonaws.services.kinesis.model.StreamStatus;
import com.amazonaws.services.kinesis.model.LimitExceededException;

import static junit.framework.TestCase.fail;

Expand All @@ -58,6 +59,8 @@ public class ShardSyncTaskIntegrationTest {
private IKinesisProxy kinesisProxy;
private final KinesisShardSyncer shardSyncer = new KinesisShardSyncer(new KinesisLeaseCleanupValidator());

private static final int retryBackoffMillis = 1000;

/**
* @throws java.lang.Exception
*/
Expand All @@ -71,9 +74,13 @@ public static void setUpBeforeClass() throws Exception {
} catch (AmazonServiceException ase) {

}
StreamStatus status;
StreamStatus status = null;
do {
status = StreamStatus.fromValue(kinesis.describeStream(STREAM_NAME).getStreamDescription().getStreamStatus());
try {
status = StreamStatus.fromValue(kinesis.describeStream(STREAM_NAME).getStreamDescription().getStreamStatus());
} catch (LimitExceededException e) {
Thread.sleep(retryBackoffMillis + (long) (Math.random() * 100));
}
} while (status != StreamStatus.ACTIVE);

}
Expand Down

0 comments on commit e731486

Please sign in to comment.