diff --git a/server/src/test/java/org/elasticsearch/index/mapper/KeywordFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/KeywordFieldMapperTests.java index 4d53b9435934b..053865746de2c 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/KeywordFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/KeywordFieldMapperTests.java @@ -375,7 +375,7 @@ public void testDimensionExtraLongKeyword() throws IOException { })); Exception e = expectThrows(MapperParsingException.class, - () -> mapper.parse(source(b -> b.field("field", randomAlphaOfLengthBetween(1024, 2048))))); + () -> mapper.parse(source(b -> b.field("field", randomAlphaOfLengthBetween(1025, 2048))))); assertThat(e.getCause().getMessage(), containsString("Dimension field [field] cannot be more than [1024] bytes long.")); }