Skip to content

Commit

Permalink
[Tests] Fix De-/serialization tests of HighlightBuilder (#69259)
Browse files Browse the repository at this point in the history
Assign a value different that the original when testing
mutation of the builder.

Follows: #67325
(cherry picked from commit 4a6c957)
  • Loading branch information
matriv committed Feb 19, 2021
1 parent 8dc3752 commit 2bcd0b6
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,9 @@ private static void mutateCommonOptions(AbstractHighlighterBuilder highlightBuil
highlightBuilder.requireFieldMatch(toggleOrSet(highlightBuilder.requireFieldMatch()));
break;
case 17:
highlightBuilder.maxAnalyzedOffset(randomIntBetween(1, 100));
highlightBuilder.maxAnalyzedOffset(
randomValueOtherThan(highlightBuilder.maxAnalyzedOffset(), () -> randomIntBetween(1, 100))
);
break;
}
}
Expand Down

0 comments on commit 2bcd0b6

Please sign in to comment.