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]>
  • Loading branch information
reta authored and Peter Alfonsi committed Mar 1, 2024
1 parent 0fdb90b commit 0c02956
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 0c02956

Please sign in to comment.