Fixing unit tests.
This commit is contained in:
parent
8609820f20
commit
05f2002596
1 changed files with 3 additions and 4 deletions
|
|
@ -1644,12 +1644,11 @@ public class HierarchicalShardSyncerTest {
|
||||||
|
|
||||||
public void testEmptyLeaseTableBootstrapUsesListShardsWithFilter(InitialPositionInStreamExtended initialPosition, ShardFilter shardFilter) throws Exception {
|
public void testEmptyLeaseTableBootstrapUsesListShardsWithFilter(InitialPositionInStreamExtended initialPosition, ShardFilter shardFilter) throws Exception {
|
||||||
final String shardId0 = "shardId-0";
|
final String shardId0 = "shardId-0";
|
||||||
final List<Shard> shards = Arrays.asList(ShardObjectHelper.newShard(shardId0, null, null, ShardObjectHelper.newSequenceNumberRange("1", null)));
|
final List<Shard> shards = Arrays.asList(ShardObjectHelper.newShard(shardId0, null, null,
|
||||||
final List<Lease> currentLeases = Collections.emptyList();
|
ShardObjectHelper.newSequenceNumberRange("1", null), ShardObjectHelper.newHashKeyRange(ShardObjectHelper.MIN_HASH_KEY, ShardObjectHelper.MAX_HASH_KEY)));
|
||||||
|
|
||||||
when(dynamoDBLeaseRefresher.isLeaseTableEmpty()).thenReturn(true);
|
when(dynamoDBLeaseRefresher.isLeaseTableEmpty()).thenReturn(true);
|
||||||
when(shardDetector.listShards()).thenReturn(shards);
|
when(shardDetector.listShardsWithFilter(shardFilter)).thenReturn(shards);
|
||||||
when(dynamoDBLeaseRefresher.listLeases()).thenReturn(currentLeases);
|
|
||||||
|
|
||||||
hierarchicalShardSyncer
|
hierarchicalShardSyncer
|
||||||
.checkAndCreateLeaseForNewShards(shardDetector, dynamoDBLeaseRefresher, initialPosition,
|
.checkAndCreateLeaseForNewShards(shardDetector, dynamoDBLeaseRefresher, initialPosition,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue