Skip to content

Commit

Permalink
Fix spotless.
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Handalian <[email protected]>
  • Loading branch information
mch2 committed Sep 3, 2022
1 parent a1e60d3 commit f424567
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 f424567

Please sign in to comment.