Skip to content

Commit

Permalink
[BUG] Fix org.opensearch.common.xcontent.XContentParserTests.testStri…
Browse files Browse the repository at this point in the history
…ng flaky test (#13164)

Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta authored Apr 11, 2024
1 parent 7103e56 commit 5d939b9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public class XContentParserTests extends OpenSearchTestCase {
() -> randomAlphaOfLengthBetween(1, SmileXContent.DEFAULT_MAX_STRING_LEN),
/* YAML parser limitation */
XContentType.YAML,
/* use 75% of the limit, difficult to get the exact size of the content right */
() -> randomRealisticUnicodeOfCodepointLengthBetween(1, (int) (YamlXContent.DEFAULT_CODEPOINT_LIMIT * 0.75))
/* use 50% of the limit, difficult to get the exact size of the content right */
() -> randomRealisticUnicodeOfCodepointLengthBetween(1, (int) (YamlXContent.DEFAULT_CODEPOINT_LIMIT * 0.50))
);

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

0 comments on commit 5d939b9

Please sign in to comment.