From 69d5c070bec98d5a3b6768667a5a97901829f620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Tue, 26 May 2015 11:28:32 +0200 Subject: [PATCH] Changing references of ImmutableSettings to Settings after merge with master --- .../index/query/BaseQueryTestCase.java | 15 +++++++++++---- .../index/query/RangeQueryBuilderTest.java | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/elasticsearch/index/query/BaseQueryTestCase.java b/src/test/java/org/elasticsearch/index/query/BaseQueryTestCase.java index 323e3de41df..71894edec73 100644 --- a/src/test/java/org/elasticsearch/index/query/BaseQueryTestCase.java +++ b/src/test/java/org/elasticsearch/index/query/BaseQueryTestCase.java @@ -20,6 +20,7 @@ package org.elasticsearch.index.query; import com.carrotsearch.randomizedtesting.annotations.Repeat; + import org.apache.lucene.search.Query; import org.elasticsearch.Version; import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest; @@ -33,7 +34,6 @@ import org.elasticsearch.common.inject.ModulesBuilder; import org.elasticsearch.common.inject.util.Providers; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.SettingsModule; import org.elasticsearch.common.xcontent.XContentFactory; @@ -57,11 +57,18 @@ import org.elasticsearch.test.ElasticsearchTestCase; import org.elasticsearch.test.TestSearchContext; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.threadpool.ThreadPoolModule; -import org.junit.*; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; import java.io.IOException; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.is; @Ignore public abstract class BaseQueryTestCase> extends ElasticsearchTestCase { @@ -88,7 +95,7 @@ public abstract class BaseQueryTestCase> extends Ela */ @BeforeClass public static void init() throws IOException { - Settings settings = ImmutableSettings.settingsBuilder() + Settings settings = Settings.settingsBuilder() .put("name", BaseQueryTestCase.class.toString()) .put("path.home", createTempDir()) .put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT) diff --git a/src/test/java/org/elasticsearch/index/query/RangeQueryBuilderTest.java b/src/test/java/org/elasticsearch/index/query/RangeQueryBuilderTest.java index 688292593a8..8f173dab9b0 100644 --- a/src/test/java/org/elasticsearch/index/query/RangeQueryBuilderTest.java +++ b/src/test/java/org/elasticsearch/index/query/RangeQueryBuilderTest.java @@ -27,7 +27,7 @@ import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.common.joda.DateMathParser; import org.elasticsearch.common.joda.Joda; import org.elasticsearch.common.lucene.BytesRefs; -import org.elasticsearch.common.settings.ImmutableSettings; +import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.mapper.ContentPath; import org.elasticsearch.index.mapper.Mapper; import org.elasticsearch.index.mapper.core.DateFieldMapper; @@ -101,7 +101,7 @@ public class RangeQueryBuilderTest extends BaseQueryTestCase } else if (queryBuilder.fieldName().equals(DATE_FIELD_NAME)) { DateFieldMapper.Builder fieldMapperBuilder = new DateFieldMapper.Builder(queryBuilder.fieldName()); - DateFieldMapper fieldMapper = fieldMapperBuilder.build(new Mapper.BuilderContext(ImmutableSettings.builder().put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT).build(), new ContentPath())); + DateFieldMapper fieldMapper = fieldMapperBuilder.build(new Mapper.BuilderContext(Settings.builder().put(IndexMetaData.SETTING_VERSION_CREATED, Version.CURRENT).build(), new ContentPath())); DateMathParser dateMathParser = null; if (queryBuilder.format() != null) { dateMathParser = new DateMathParser(Joda.forPattern(queryBuilder.format()), DateFieldMapper.Defaults.TIME_UNIT);