Skip to content

Commit

Permalink
spotless fix
Browse files Browse the repository at this point in the history
Signed-off-by: Gaurav Bafna <[email protected]>
  • Loading branch information
gbbafna committed Mar 21, 2024
1 parent 8204388 commit d075375
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.IOContext;
import org.apache.lucene.store.IndexInput;
import org.junit.Assert;
import org.mockito.Mockito;
import org.opensearch.ExceptionsHelper;
import org.opensearch.Version;
import org.opensearch.action.admin.indices.flush.FlushRequest;
Expand Down Expand Up @@ -159,6 +157,7 @@
import org.opensearch.threadpool.TestThreadPool;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.transport.TransportService;
import org.junit.Assert;

import java.io.IOException;
import java.nio.file.Path;
Expand All @@ -181,6 +180,10 @@
import java.util.function.Function;
import java.util.stream.Collectors;

import org.mockito.Mockito;

import static org.opensearch.cluster.routing.TestShardRouting.newShardRouting;
import static org.opensearch.test.ClusterServiceUtils.createClusterService;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
Expand All @@ -189,8 +192,6 @@
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.opensearch.cluster.routing.TestShardRouting.newShardRouting;
import static org.opensearch.test.ClusterServiceUtils.createClusterService;

/**
* A base class for unit tests that need to create and shutdown {@link IndexShard} instances easily,
Expand Down Expand Up @@ -619,7 +620,10 @@ protected IndexShard newShard(
Settings nodeSettings = Settings.builder().put("node.name", routing.currentNodeId()).build();
// To simulate that the node is remote backed
if (indexMetadata.getSettings().get(IndexMetadata.SETTING_REMOTE_STORE_ENABLED) == "true") {
nodeSettings = Settings.builder().put("node.name", routing.currentNodeId()).put("node.attr.remote_store.translog.repository", "seg_repo").build();
nodeSettings = Settings.builder()
.put("node.name", routing.currentNodeId())
.put("node.attr.remote_store.translog.repository", "seg_repo")
.build();
}
final IndexSettings indexSettings = new IndexSettings(indexMetadata, nodeSettings);
final IndexShard indexShard;
Expand Down

0 comments on commit d075375

Please sign in to comment.