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) (#13165)

(cherry picked from commit 5d939b9)

Signed-off-by: Andriy Redko <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 0ed8e6c commit 424344e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public class XContentParserTests extends OpenSearchTestCase {
() -> randomAlphaOfLengthBetween(1, SmileXContent.DEFAULT_MAX_STRING_LEN / 10), /* limit to ~200Mb */
/* 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>> FIELD_NAME_GENERATORS = Map.of(
Expand Down

0 comments on commit 424344e

Please sign in to comment.