Skip to content

Commit

Permalink
fix forbiddenApisInternalClusterTest
Browse files Browse the repository at this point in the history
Signed-off-by: Pranshu Shukla <[email protected]>
  • Loading branch information
Pranshu-S committed Dec 3, 2024
1 parent a0c1abd commit ed9f5e7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.opensearch.cluster.node.DiscoveryNode;
import org.opensearch.cluster.node.DiscoveryNodes;
import org.opensearch.cluster.service.ClusterService;
import org.opensearch.common.Randomness;
import org.opensearch.common.settings.Settings;
import org.opensearch.repositories.RepositoriesService;
import org.opensearch.repositories.fs.ReloadableFsRepository;
Expand All @@ -56,7 +57,6 @@
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -304,8 +304,7 @@ public void testElectClusterManagerRemotePublicationConfigurationNodeJoinCommitF
internalCluster().stopCurrentClusterManagerNode();
ensureStableCluster(6);

Random random = new Random();
String randomNode = nonClusterManagerNodes.get(random.nextInt(nonClusterManagerNodes.size()));
String randomNode = nonClusterManagerNodes.get(Randomness.get().nextInt(nonClusterManagerNodes.size()));

RepositoriesMetadata repositoriesMetadata = internalCluster().getInstance(ClusterService.class, randomNode)
.state()
Expand Down

0 comments on commit ed9f5e7

Please sign in to comment.