diff --git a/src/test/java/com/amazonaws/services/kinesis/clientlibrary/proxies/KinesisProxyTest.java b/src/test/java/com/amazonaws/services/kinesis/clientlibrary/proxies/KinesisProxyTest.java index c877ed79..a847b89f 100644 --- a/src/test/java/com/amazonaws/services/kinesis/clientlibrary/proxies/KinesisProxyTest.java +++ b/src/test/java/com/amazonaws/services/kinesis/clientlibrary/proxies/KinesisProxyTest.java @@ -249,54 +249,6 @@ public class KinesisProxyTest { ddbProxy.getShardList(); } - @Test - public void testGetStreamInfoStoresOffset() throws Exception { - when(describeStreamResult.getStreamDescription()).thenReturn(streamDescription); - when(streamDescription.getStreamStatus()).thenReturn(StreamStatus.ACTIVE.name()); - Shard shard1 = mock(Shard.class); - Shard shard2 = mock(Shard.class); - Shard shard3 = mock(Shard.class); - List shardList1 = Collections.singletonList(shard1); - List shardList2 = Collections.singletonList(shard2); - List shardList3 = Collections.singletonList(shard3); - - String shardId1 = "ShardId-0001"; - String shardId2 = "ShardId-0002"; - String shardId3 = "ShardId-0003"; - - when(shard1.getShardId()).thenReturn(shardId1); - when(shard2.getShardId()).thenReturn(shardId2); - when(shard3.getShardId()).thenReturn(shardId3); - - when(streamDescription.getShards()).thenReturn(shardList1).thenReturn(shardList2).thenReturn(shardList3); - when(streamDescription.isHasMoreShards()).thenReturn(true, true, false); - when(mockDDBStreamClient.describeStream(argThat(describeWithoutShardId()))).thenReturn(describeStreamResult); - - when(mockDDBStreamClient.describeStream(argThat(describeWithShardId(shardId1)))) - .thenThrow(new LimitExceededException("1"), new LimitExceededException("2"), - new LimitExceededException("3")) - .thenReturn(describeStreamResult); - - when(mockDDBStreamClient.describeStream(argThat(describeWithShardId(shardId2)))).thenReturn(describeStreamResult); - - boolean limitExceeded = false; - try { - ddbProxy.getShardList(); - } catch (LimitExceededException le) { - limitExceeded = true; - } - assertThat(limitExceeded, equalTo(true)); - List actualShards = ddbProxy.getShardList(); - List expectedShards = Arrays.asList(shard1, shard2, shard3); - - assertThat(actualShards, equalTo(expectedShards)); - - verify(mockDDBStreamClient).describeStream(argThat(describeWithoutShardId())); - verify(mockDDBStreamClient, times(4)).describeStream(argThat(describeWithShardId(shardId1))); - verify(mockDDBStreamClient).describeStream(argThat(describeWithShardId(shardId2))); - - } - @Test public void testListShardsWithMoreDataAvailable() { ListShardsResult responseWithMoreData = new ListShardsResult().withShards(shards.subList(0, 2)).withNextToken(NEXT_TOKEN);