Fix flaky HashRangesAreAlwaysComplete test
Updates depth value for Merge and Reshard with some In-Progress Parents tests to prevent invalid hierarchy trees.
This commit is contained in:
parent
c23d83dc9a
commit
68c831c2e6
1 changed files with 4 additions and 2 deletions
|
|
@ -58,6 +58,8 @@ import static software.amazon.kinesis.leases.LeaseManagementConfig.DEFAULT_CONSE
|
|||
|
||||
public class PeriodicShardSyncManagerTest {
|
||||
|
||||
private static final int MAX_DEPTH_WITH_IN_PROGRESS_PARENTS = 1;
|
||||
|
||||
private StreamIdentifier streamIdentifier;
|
||||
private PeriodicShardSyncManager periodicShardSyncManager;
|
||||
@Mock
|
||||
|
|
@ -446,7 +448,7 @@ public class PeriodicShardSyncManagerTest {
|
|||
for (int i = 0; i < 1000; i++) {
|
||||
int maxInitialLeaseCount = 100;
|
||||
List<Lease> leases = generateInitialLeases(maxInitialLeaseCount);
|
||||
reshard(leases, 5, ReshardType.MERGE, maxInitialLeaseCount, true);
|
||||
reshard(leases, MAX_DEPTH_WITH_IN_PROGRESS_PARENTS, ReshardType.MERGE, maxInitialLeaseCount, true);
|
||||
Collections.shuffle(leases);
|
||||
Assert.assertFalse(periodicShardSyncManager.hasHoleInLeases(streamIdentifier, leases).isPresent());
|
||||
}
|
||||
|
|
@ -457,7 +459,7 @@ public class PeriodicShardSyncManagerTest {
|
|||
for (int i = 0; i < 1000; i++) {
|
||||
int maxInitialLeaseCount = 100;
|
||||
List<Lease> leases = generateInitialLeases(maxInitialLeaseCount);
|
||||
reshard(leases, 5, ReshardType.ANY, maxInitialLeaseCount, true);
|
||||
reshard(leases, MAX_DEPTH_WITH_IN_PROGRESS_PARENTS, ReshardType.ANY, maxInitialLeaseCount, true);
|
||||
Collections.shuffle(leases);
|
||||
boolean isHoleInHashRanges = periodicShardSyncManager.hasHoleInLeases(streamIdentifier, leases).isPresent();
|
||||
if (isHoleInHashRanges) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue