Skip to content

Commit

Permalink
[BUG] org.opensearch.common.xcontent.XContentParserTests.testString i…
Browse files Browse the repository at this point in the history
…s flaky (#12415)

Signed-off-by: Andriy Redko <[email protected]>
(cherry picked from commit bf050d4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Feb 21, 2024
1 parent fc18c3c commit 63438ad
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public class XContentParserTests extends OpenSearchTestCase {
() -> randomAlphaOfLengthBetween(1, SmileXContent.DEFAULT_MAX_STRING_LEN / 10), /* limit to ~200Mb */
/* YAML parser limitation */
XContentType.YAML,
() -> randomRealisticUnicodeOfCodepointLengthBetween(1, YamlXContent.DEFAULT_CODEPOINT_LIMIT)
/* use 75% of the limit, difficult to get the exact size of the content right */
() -> randomRealisticUnicodeOfCodepointLengthBetween(1, (int) (YamlXContent.DEFAULT_CODEPOINT_LIMIT * 0.75))
);

private static final Map<XContentType, Supplier<String>> FIELD_NAME_GENERATORS = Map.of(
Expand Down

0 comments on commit 63438ad

Please sign in to comment.