diff --git a/server/src/test/java/org/elasticsearch/index/mapper/DateFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/DateFieldMapperTests.java index a8cc3bace932e..4072b15018fb9 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/DateFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/DateFieldMapperTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.index.mapper; +import org.apache.logging.log4j.Level; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.IndexableField; import org.elasticsearch.Version; @@ -148,9 +149,9 @@ public void testResolutionLossDeprecation() throws Exception { ParsedDocument doc = mapper.parse(source(b -> b.field("field", "2018-10-03T14:42:44.123456+0000"))); - assertWarnings("You are attempting to store a nanosecond resolution " + + assertWarnings(true, new DeprecationWarning(Level.WARN, "You are attempting to store a nanosecond resolution " + "on a field [field] of type date on index [index]. " + - "The nanosecond part was lost. Use date_nanos field type."); + "The nanosecond part was lost. Use date_nanos field type.")); } private void testIgnoreMalformedForValue(String value, String expectedCause, String dateFormat) throws IOException {