Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
Signed-off-by: Rishab Nahata <rnnahata@amazon.com>
  • Loading branch information
imRishN committed Jul 9, 2024
1 parent 4cc0676 commit 50d7235
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import org.opensearch.snapshots.SnapshotShardSizeInfo;
import org.junit.Before;

import java.sql.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -277,8 +276,8 @@ public void testCancelRecoveryIfFoundCopyWithNoopRetentionLease() {
);
Collection<ShardRouting> replicaShards = allocation.routingNodes().shardsWithState(ShardRoutingState.UNASSIGNED);
List<ShardRouting> shardRoutingBatch = new ArrayList<>(replicaShards);
List<Set<ShardRouting>> shardBatchList = Collections.singletonList(
new HashSet<>(allocation.routingNodes().shardsWithState(ShardRoutingState.INITIALIZING))
List<List<ShardRouting>> shardBatchList = Collections.singletonList(
new ArrayList<>(allocation.routingNodes().shardsWithState(ShardRoutingState.INITIALIZING))
);

testBatchAllocator.processExistingRecoveries(allocation, shardBatchList);
Expand Down Expand Up @@ -530,7 +529,7 @@ public void testCancelRecoveryBetterSyncId() {
.addData(node3, "MATCH", null, new StoreFileMetadata("file1", 10, "MATCH_CHECKSUM", MIN_SUPPORTED_LUCENE_VERSION));
testBatchAllocator.processExistingRecoveries(
allocation,
Collections.singletonList(new HashSet<>(allocation.routingNodes().shardsWithState(ShardRoutingState.INITIALIZING)))
Collections.singletonList(new ArrayList<>(allocation.routingNodes().shardsWithState(ShardRoutingState.INITIALIZING)))
);
assertThat(allocation.routingNodesChanged(), equalTo(true));
assertThat(allocation.routingNodes().shardsWithState(ShardRoutingState.UNASSIGNED).size(), equalTo(1));
Expand Down

0 comments on commit 50d7235

Please sign in to comment.