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 (opensearch-project#12415)

Signed-off-by: Andriy Redko <[email protected]>
Signed-off-by: Aman Khare <[email protected]>
  • Loading branch information
reta authored and Aman Khare committed Mar 12, 2024
1 parent f918fc5 commit 5c55273
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ public class XContentParserTests extends OpenSearchTestCase {
() -> randomAlphaOfLengthBetween(1, SmileXContent.DEFAULT_MAX_STRING_LEN),
/* 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>> OFF_LIMIT_GENERATORS = Map.of(
Expand Down

0 comments on commit 5c55273

Please sign in to comment.