Skip to content

Commit

Permalink
Fix failing forbidden APIs check
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Singh <surajrider@gmail.com>
  • Loading branch information
dreamer-89 committed Dec 12, 2023
1 parent 722f064 commit 2333244
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.function.BiConsumer;

import static org.opensearch.cluster.metadata.IndexMetadata.SETTING_REPLICATION_TYPE;
Expand Down Expand Up @@ -203,7 +204,7 @@ public void testMismatchingReplicationType_ResizeAction_StrictMode() throws Thro
resizeActionsList.add(new Tuple<>(ResizeType.CLONE, SHARD_COUNT));

Tuple<ResizeType, Integer> resizeActionTuple = resizeActionsList.get(random().nextInt(resizeActionsList.size()));
final String targetIndexName = resizeActionTuple.v1().name().toLowerCase() + "-target";
final String targetIndexName = resizeActionTuple.v1().name().toLowerCase(Locale.ROOT) + "-target";
final int documentCount = scaledRandomIntBetween(1, 10);

// Create an index using current cluster level settings
Expand All @@ -230,7 +231,7 @@ public void testMismatchingReplicationType_ResizeAction_StrictMode() throws Thro
// Test create index fails
client().admin()
.indices()
.prepareResizeIndex(INDEX_NAME, resizeActionTuple.v1().name().toLowerCase() + "-target")
.prepareResizeIndex(INDEX_NAME, targetIndexName)
.setResizeType(resizeActionTuple.v1())
.setSettings(
Settings.builder()
Expand All @@ -253,7 +254,7 @@ public void testMismatchingReplicationType_ResizeAction_NonStrictMode() throws T
resizeActionsList.add(new Tuple<>(ResizeType.CLONE, initialShardCount));

Tuple<ResizeType, Integer> resizeActionTuple = resizeActionsList.get(random().nextInt(resizeActionsList.size()));
final String targetIndexName = resizeActionTuple.v1().name().toLowerCase() + "-target";
final String targetIndexName = resizeActionTuple.v1().name().toLowerCase(Locale.ROOT) + "-target";
final int documentCount = scaledRandomIntBetween(1, 10);

// Create an index using current cluster level settings
Expand Down

0 comments on commit 2333244

Please sign in to comment.