Skip to content

Commit 989e24c

Browse files
Fix for issue 119723 (elastic#120001) (elastic#122552)
Adjust random parameter generator to exclude newly valid value (-1) Closes elastic#119723 (cherry picked from commit 53773cb)
1 parent c4ebcd4 commit 989e24c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/test/java/org/elasticsearch/search/fetch/subphase/highlight/HighlightBuilderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ public void testPreTagsWithoutPostTags() throws IOException {
577577
public void testInvalidMaxAnalyzedOffset() throws IOException {
578578
XContentParseException e = expectParseThrows(
579579
XContentParseException.class,
580-
"{ \"max_analyzed_offset\" : " + randomIntBetween(-100, -1) + "}"
580+
"{ \"max_analyzed_offset\" : " + randomIntBetween(-100, -2) + "}"
581581
);
582582
assertThat(e.getMessage(), containsString("[highlight] failed to parse field [" + MAX_ANALYZED_OFFSET_FIELD.toString() + "]"));
583583
assertThat(e.getCause().getMessage(), containsString("[max_analyzed_offset] must be a positive integer, or -1"));

0 commit comments

Comments
 (0)