Skip to content

Conversation

@cbuescher
Copy link
Member

Backports the following commits to 9.0:

Under very unfortunate conditions tests that check xContent objects
roundtrip parsing  (like i.e. SearchHitsTests#testFromXContent)
can fail when we happen to randomly pick YAML xContent type and create
random (realistic)Unicode character sequences that may contain the
character U+0085 (133) from the Latin1 code page. That specific character
doesn't get parsed back to its original form for YAML xContent, which can 
lead to rare but hard to diagnose test failures.

This change adds logic to AbstractXContentTestCase#test() which lies at
the core of most of our  xContent roundtrip tests that disallows test
instances containing that particular character  when using YAML xContent
type.

Closes elastic#97716
@cbuescher cbuescher added :Search Foundations/Search Catch all for Search Foundations >test Issues or PRs that are addressing/adding tests auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch labels Feb 4, 2025
@elasticsearchmachine elasticsearchmachine merged commit 3f06410 into elastic:9.0 Feb 4, 2025
16 checks passed
@cbuescher cbuescher deleted the backport/9.0/pr-121515 branch February 4, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch >test Issues or PRs that are addressing/adding tests v9.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants