Skip to content

Commit 9bec026

Browse files
authored
Fixing a unit test (#79470)
As #79107 of the ESTestCase assertWarnings methods now check that the log level is of the expected type. This commit puts in the correct expected log level. Relates #79107 #78921
1 parent d5249ce commit 9bec026

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/test/java/org/elasticsearch/index/mapper/DateFieldMapperTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
package org.elasticsearch.index.mapper;
1010

11+
import org.apache.logging.log4j.Level;
1112
import org.apache.lucene.index.DocValuesType;
1213
import org.apache.lucene.index.IndexableField;
1314
import org.elasticsearch.Version;
@@ -148,9 +149,9 @@ public void testResolutionLossDeprecation() throws Exception {
148149

149150
ParsedDocument doc = mapper.parse(source(b -> b.field("field", "2018-10-03T14:42:44.123456+0000")));
150151

151-
assertWarnings("You are attempting to store a nanosecond resolution " +
152+
assertWarnings(true, new DeprecationWarning(Level.WARN, "You are attempting to store a nanosecond resolution " +
152153
"on a field [field] of type date on index [index]. " +
153-
"The nanosecond part was lost. Use date_nanos field type.");
154+
"The nanosecond part was lost. Use date_nanos field type."));
154155
}
155156

156157
private void testIgnoreMalformedForValue(String value, String expectedCause, String dateFormat) throws IOException {

0 commit comments

Comments
 (0)