Skip to content

Commit

Permalink
Fix spotless.
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Handalian <handalm@amazon.com>
  • Loading branch information
mch2 committed Sep 1, 2022
1 parent 0410038 commit f2250f3
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions server/src/test/java/org/opensearch/index/store/StoreTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ public class StoreTests extends OpenSearchTestCase {
Settings.builder().put(IndexMetadata.SETTING_VERSION_CREATED, org.opensearch.Version.CURRENT).build()
);

IndexSettings SEGMENT_REPLICATION_INDEX_SETTINGS = new IndexSettings(INDEX_SETTINGS.getIndexMetadata(), Settings.builder()
.put(INDEX_SETTINGS.getSettings())
.put(IndexMetadata.SETTING_REPLICATION_TYPE, ReplicationType.SEGMENT)
.build());
IndexSettings SEGMENT_REPLICATION_INDEX_SETTINGS = new IndexSettings(
INDEX_SETTINGS.getIndexMetadata(),
Settings.builder().put(INDEX_SETTINGS.getSettings()).put(IndexMetadata.SETTING_REPLICATION_TYPE, ReplicationType.SEGMENT).build()
);

private static final Version MIN_SUPPORTED_LUCENE_VERSION = org.opensearch.Version.CURRENT
.minimumIndexCompatibilityVersion().luceneVersion;
Expand Down Expand Up @@ -1160,7 +1160,12 @@ public void testGetMetadataWithSegmentInfos() throws IOException {

public void testCleanupAndPreserveLatestCommitPoint() throws IOException {
final ShardId shardId = new ShardId("index", "_na_", 1);
Store store = new Store(shardId, SEGMENT_REPLICATION_INDEX_SETTINGS, StoreTests.newDirectory(random()), new DummyShardLock(shardId));
Store store = new Store(
shardId,
SEGMENT_REPLICATION_INDEX_SETTINGS,
StoreTests.newDirectory(random()),
new DummyShardLock(shardId)
);
commitRandomDocs(store);

Store.MetadataSnapshot commitMetadata = store.getMetadata();
Expand All @@ -1178,7 +1183,12 @@ public void testCleanupAndPreserveLatestCommitPoint() throws IOException {

public void testGetSegmentMetadataMap() throws IOException {
final ShardId shardId = new ShardId("index", "_na_", 1);
Store store = new Store(shardId, SEGMENT_REPLICATION_INDEX_SETTINGS, new NIOFSDirectory(createTempDir()), new DummyShardLock(shardId));
Store store = new Store(
shardId,
SEGMENT_REPLICATION_INDEX_SETTINGS,
new NIOFSDirectory(createTempDir()),
new DummyShardLock(shardId)
);
store.createEmpty(Version.LATEST);
final Map<String, StoreFileMetadata> metadataSnapshot = store.getSegmentMetadataMap(store.readLastCommittedSegmentsInfo());
// no docs indexed only _N file exists.
Expand Down

0 comments on commit f2250f3

Please sign in to comment.