@Test(expected = IllegalStateException.class) public void testListShardsNullResponse() { final CompletableFuture<ListShardsResponse> future = CompletableFuture.completedFuture(null); when(client.listShards(any(ListShardsRequest.class))).thenReturn(future); try { shardDetector.listShards(); } finally { verify(client, times(MAX_LIST_SHARDS_RETRY_ATTEMPTS)) .listShards(any(ListShardsRequest.class)); } }
@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);  }