@Test public void testListShardsTimesOut() throws Exception { expectedExceptionRule.expect(RuntimeException.class); expectedExceptionRule.expectCause(isA(TimeoutException.class)); when(mockFuture.get(anyLong(), any(TimeUnit.class))).thenThrow(new TimeoutException("Timeout")); when(client.listShards(any(ListShardsRequest.class))).thenReturn(mockFuture); shardDetector.listShards(); }
@Override @Synchronized public List<Shard> listShards() { return listShardsWithFilter(null); }
KinesisShardDetector implements ShardDetector { @Override @Synchronized public List<Shard> listShards() { return listShardsWithFilter(null); } }
KinesisShardDetector implements ShardDetector { @Override @Synchronized public List<Shard> listShards() { return listShardsWithFilter(null); } @Deprecated  KinesisShardDetector(KinesisAsyncClient kinesisClient, String streamName, long listShardsBackoffTimeInMillis,
            int maxListShardsRetryAttempts, long listShardsCacheAllowedAgeInSeconds, int maxCacheMissesBeforeReload,
            int cacheMissWarningModulus);  KinesisShardDetector(KinesisAsyncClient kinesisClient, StreamIdentifier streamIdentifier, long listShardsBackoffTimeInMillis,
            int maxListShardsRetryAttempts, long listShardsCacheAllowedAgeInSeconds, int maxCacheMissesBeforeReload,
            int cacheMissWarningModulus, Duration kinesisRequestTimeout); }
KinesisShardDetector implements ShardDetector { @Override @Synchronized public List<Shard> listShards() { return listShardsWithFilter(null); } @Deprecated  KinesisShardDetector(KinesisAsyncClient kinesisClient, String streamName, long listShardsBackoffTimeInMillis,
            int maxListShardsRetryAttempts, long listShardsCacheAllowedAgeInSeconds, int maxCacheMissesBeforeReload,
            int cacheMissWarningModulus);  KinesisShardDetector(KinesisAsyncClient kinesisClient, StreamIdentifier streamIdentifier, long listShardsBackoffTimeInMillis,
            int maxListShardsRetryAttempts, long listShardsCacheAllowedAgeInSeconds, int maxCacheMissesBeforeReload,
            int cacheMissWarningModulus, Duration kinesisRequestTimeout); @Override Shard shard(@NonNull final String shardId); @Override @Synchronized List<Shard> listShards(); @Override @Synchronized List<Shard> listShardsWithFilter(ShardFilter shardFilter); @Override ListShardsResponse getListShardsResponse(ListShardsRequest request); @Override List<ChildShard> getChildShards(final String shardId); }
KinesisShardDetector implements ShardDetector { @Override @Synchronized public List<Shard> listShards() { return listShardsWithFilter(null); } @Deprecated  KinesisShardDetector(KinesisAsyncClient kinesisClient, String streamName, long listShardsBackoffTimeInMillis,
            int maxListShardsRetryAttempts, long listShardsCacheAllowedAgeInSeconds, int maxCacheMissesBeforeReload,
            int cacheMissWarningModulus);  KinesisShardDetector(KinesisAsyncClient kinesisClient, StreamIdentifier streamIdentifier, long listShardsBackoffTimeInMillis,
            int maxListShardsRetryAttempts, long listShardsCacheAllowedAgeInSeconds, int maxCacheMissesBeforeReload,
            int cacheMissWarningModulus, Duration kinesisRequestTimeout); @Override Shard shard(@NonNull final String shardId); @Override @Synchronized List<Shard> listShards(); @Override @Synchronized List<Shard> listShardsWithFilter(ShardFilter shardFilter); @Override ListShardsResponse getListShardsResponse(ListShardsRequest request); @Override List<ChildShard> getChildShards(final String shardId);  }