From 2fb3591792349e09b897185fe693a2c7cd57be27 Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Sat, 3 Nov 2012 19:33:26 -0400 Subject: [PATCH] lucene4: fixed default values tests to refer to correct default FieldType constants --- .../unit/index/mapper/timestamp/TimestampMappingTests.java | 5 ++--- .../test/unit/index/mapper/ttl/TTLMappingTests.java | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/test/java/org/elasticsearch/test/unit/index/mapper/timestamp/TimestampMappingTests.java b/src/test/java/org/elasticsearch/test/unit/index/mapper/timestamp/TimestampMappingTests.java index be6311e3ea7..810ae221346 100644 --- a/src/test/java/org/elasticsearch/test/unit/index/mapper/timestamp/TimestampMappingTests.java +++ b/src/test/java/org/elasticsearch/test/unit/index/mapper/timestamp/TimestampMappingTests.java @@ -19,7 +19,6 @@ package org.elasticsearch.test.unit.index.mapper.timestamp; -import org.apache.lucene.document.Field; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.mapper.DocumentMapper; @@ -74,8 +73,8 @@ public class TimestampMappingTests { String mapping = XContentFactory.jsonBuilder().startObject().startObject("type").endObject().string(); DocumentMapper docMapper = MapperTests.newParser().parse(mapping); assertThat(docMapper.timestampFieldMapper().enabled(), equalTo(TimestampFieldMapper.Defaults.ENABLED)); - assertThat(docMapper.timestampFieldMapper().stored(), equalTo(TimestampFieldMapper.Defaults.FIELD_TYPE.stored())); - assertThat(docMapper.timestampFieldMapper().indexed(), equalTo(TimestampFieldMapper.Defaults.FIELD_TYPE.indexed())); + assertThat(docMapper.timestampFieldMapper().stored(), equalTo(TimestampFieldMapper.Defaults.TIMESTAMP_FIELD_TYPE.stored())); + assertThat(docMapper.timestampFieldMapper().indexed(), equalTo(TimestampFieldMapper.Defaults.TIMESTAMP_FIELD_TYPE.indexed())); assertThat(docMapper.timestampFieldMapper().path(), equalTo(null)); assertThat(docMapper.timestampFieldMapper().dateTimeFormatter().format(), equalTo(TimestampFieldMapper.DEFAULT_DATE_TIME_FORMAT)); } diff --git a/src/test/java/org/elasticsearch/test/unit/index/mapper/ttl/TTLMappingTests.java b/src/test/java/org/elasticsearch/test/unit/index/mapper/ttl/TTLMappingTests.java index afcfc5f367f..ad6afa72119 100644 --- a/src/test/java/org/elasticsearch/test/unit/index/mapper/ttl/TTLMappingTests.java +++ b/src/test/java/org/elasticsearch/test/unit/index/mapper/ttl/TTLMappingTests.java @@ -20,7 +20,6 @@ package org.elasticsearch.test.unit.index.mapper.ttl; -import org.apache.lucene.document.Field; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.mapper.DocumentMapper; @@ -72,8 +71,8 @@ public class TTLMappingTests { String mapping = XContentFactory.jsonBuilder().startObject().startObject("type").endObject().string(); DocumentMapper docMapper = MapperTests.newParser().parse(mapping); assertThat(docMapper.TTLFieldMapper().enabled(), equalTo(TTLFieldMapper.Defaults.ENABLED)); - assertThat(docMapper.TTLFieldMapper().stored(), equalTo(TTLFieldMapper.Defaults.FIELD_TYPE.stored())); - assertThat(docMapper.TTLFieldMapper().indexed(), equalTo(TTLFieldMapper.Defaults.FIELD_TYPE.indexed())); + assertThat(docMapper.TTLFieldMapper().stored(), equalTo(TTLFieldMapper.Defaults.TTL_FIELD_TYPE.stored())); + assertThat(docMapper.TTLFieldMapper().indexed(), equalTo(TTLFieldMapper.Defaults.TTL_FIELD_TYPE.indexed())); }