diff --git a/server/src/test/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponseTests.java b/server/src/test/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponseTests.java index 934bd4d4d7ce8..c01335eb38afc 100644 --- a/server/src/test/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponseTests.java +++ b/server/src/test/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponseTests.java @@ -43,7 +43,6 @@ import org.opensearch.test.OpenSearchTestCase; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; @@ -96,7 +95,7 @@ public void testGetIndices() { shardSegmentsList.add(new ShardSegments(shardRouting, segmentList)); } } - Collections.shuffle(shardSegmentsList); + Collections.shuffle(shardSegmentsList, random()); // Prepare the IndicesSegmentResponse object and get the indicesSegments map IndicesSegmentResponse response = new IndicesSegmentResponse(