summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/index/engine
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/java/org/elasticsearch/index/engine')
-rw-r--r--core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java8
-rw-r--r--core/src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java4
2 files changed, 8 insertions, 4 deletions
diff --git a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java
index 7c586b204b..94b95d1aab 100644
--- a/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java
+++ b/core/src/test/java/org/elasticsearch/index/engine/InternalEngineTests.java
@@ -88,6 +88,7 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
+import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.VersionType;
@@ -290,7 +291,8 @@ public class InternalEngineTests extends ESTestCase {
document.add(seqID.seqNo);
document.add(seqID.seqNoDocValue);
document.add(seqID.primaryTerm);
- return new ParsedDocument(versionField, seqID, id, type, routing, Arrays.asList(document), source, mappingUpdate);
+ return new ParsedDocument(versionField, seqID, id, type, routing, Arrays.asList(document), source, XContentType.JSON,
+ mappingUpdate);
}
protected Store createStore() throws IOException {
@@ -718,7 +720,7 @@ public class InternalEngineTests extends ESTestCase {
public void testFlushIsDisabledDuringTranslogRecovery() throws IOException {
assertFalse(engine.isRecovering());
- ParsedDocument doc = testParsedDocument("1", "test", null, testDocumentWithTextField(), B_1, null);
+ ParsedDocument doc = testParsedDocument("1", "test", null, testDocumentWithTextField(), SOURCE, null);
engine.index(indexForDoc(doc));
engine.close();
@@ -727,7 +729,7 @@ public class InternalEngineTests extends ESTestCase {
assertTrue(engine.isRecovering());
engine.recoverFromTranslog();
assertFalse(engine.isRecovering());
- doc = testParsedDocument("2", "test", null, testDocumentWithTextField(), B_1, null);
+ doc = testParsedDocument("2", "test", null, testDocumentWithTextField(), SOURCE, null);
engine.index(indexForDoc(doc));
engine.flush();
}
diff --git a/core/src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java b/core/src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java
index 219af4af4d..53708b28df 100644
--- a/core/src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java
+++ b/core/src/test/java/org/elasticsearch/index/engine/ShadowEngineTests.java
@@ -48,6 +48,7 @@ import org.elasticsearch.common.lucene.Lucene;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.util.BigArrays;
+import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.codec.CodecService;
import org.elasticsearch.index.mapper.Mapping;
@@ -179,7 +180,8 @@ public class ShadowEngineTests extends ESTestCase {
document.add(seqID.seqNoDocValue);
document.add(seqID.primaryTerm);
document.add(new LongPoint("point_field", 42)); // so that points report memory/disk usage
- return new ParsedDocument(versionField, seqID, id, type, routing, Arrays.asList(document), source, mappingsUpdate);
+ return new ParsedDocument(versionField, seqID, id, type, routing, Arrays.asList(document), source, XContentType.JSON,
+ mappingsUpdate);
}
protected Store createStore(Path p) throws IOException {