Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed YAML test runner for failing search/highlight/30_max_analyzed_offset[5] test #696

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

saimedhi
Copy link
Collaborator

@saimedhi saimedhi commented Mar 14, 2024

Description

Fixed YAML test runner for failing search/highlight/30_max_analyzed_offset[5] test in integration tests against an unreleased versions 2.x, main of OpenSearch.

  • Note: This test is failing in several released opensearch versions as well. To address the failing tests in those versions, I'll correct the skipped versions in the opensearch main branch. Skip version should be version: " - 2.12.99"

Issues Resolved

Related to #686

Additional context

  • This test case asserts

    match: {hits.hits.0.highlight.field1.0: "The <em>quick</em> "}

  • Yaml test runner is considering it as
    match: {hits.hits.0.highlight.field1.0: "The <em>quick</em>"} without space at the end because of value.strip() here.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.14%. Comparing base (d36a882) to head (9050fc6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #696   +/-   ##
=======================================
  Coverage   72.14%   72.14%           
=======================================
  Files          89       89           
  Lines        7945     7945           
=======================================
  Hits         5732     5732           
  Misses       2213     2213           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@saimedhi
Copy link
Collaborator Author

Verified that this PR is not causing additional test failures.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the problem in the test runner that doesn't behaves like other test runners and strips the value? Remove strip?

Signed-off-by: saimedhi <saimedhi@amazon.com>
@dblock
Copy link
Member

dblock commented Mar 16, 2024

Better. When it's a regex, ignore spaces, otherwise match.

@dblock dblock merged commit b2a1796 into opensearch-project:main Mar 16, 2024
52 of 55 checks passed
AbitraryYu pushed a commit to AbitraryYu/opensearch-py that referenced this pull request Apr 22, 2024
Signed-off-by: saimedhi <saimedhi@amazon.com>
Signed-off-by: AbitraryYu <nikkoyhc@gmail.com>
dblock pushed a commit to dblock/opensearch-py that referenced this pull request Aug 15, 2024
Signed-off-by: saimedhi <saimedhi@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skips changelog verifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants