diff --git a/server/src/main/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsAction.java index 714b4990a1479..ca408e5433837 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsAction.java @@ -168,7 +168,6 @@ protected SegmentReplicationShardStatsResponse shardOperation(SegmentReplication ShardId shardId = shardRouting.shardId(); IndexShard indexShard = indicesService.indexServiceSafe(shardId.getIndex()).getShard(shardId.id()); - System.out.println(indexShard.indexSettings().isSegRepEnabledOrRemoteNode()); if (indexShard.indexSettings().isSegRepEnabledOrRemoteNode() == false) { return null; } diff --git a/server/src/test/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsActionTests.java b/server/src/test/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsActionTests.java index 6e0ce969348bf..31ab27956cacd 100644 --- a/server/src/test/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsActionTests.java +++ b/server/src/test/java/org/opensearch/action/admin/indices/replication/TransportSegmentReplicationStatsActionTests.java @@ -8,9 +8,6 @@ package org.opensearch.action.admin.indices.replication; -import org.junit.Before; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; import org.opensearch.Version; import org.opensearch.action.support.ActionFilters; import org.opensearch.cluster.ClusterState; @@ -45,6 +42,7 @@ import org.opensearch.indices.replication.common.ReplicationType; import org.opensearch.test.OpenSearchTestCase; import org.opensearch.transport.TransportService; +import org.junit.Before; import java.util.ArrayList; import java.util.EnumSet; @@ -53,6 +51,9 @@ import java.util.Map; import java.util.Set; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; @@ -526,7 +527,7 @@ public void testNewResponseWhenTwoPrimaryShardsForSameIndex() { public void testNewResponseWhenShardsToFetchEmptyAndResponsesContainsNull() { SegmentReplicationStatsRequest request = new SegmentReplicationStatsRequest(); List shardFailures = new ArrayList<>(); - String[] shards = { }; + String[] shards = {}; request.shards(shards); int totalShards = 3; @@ -596,7 +597,6 @@ public void testNewResponseWhenShardsToFetchEmptyAndResponsesContainsNull() { } } - public void testShardOperationWithSegRepDisabled() { ShardRouting shardRouting = mock(ShardRouting.class); ShardId shardId = new ShardId(new Index("test-index", "test-uuid"), 0);