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

fix: read http entity only once in integ test #94

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

zhichao-aws
Copy link
Member

Description

In main and 2.x we use different http dependency in integ test. In main the dependency is from org.apache.hc.core5.http, and in 2.x it's from org.apache.http.
Current integ test code in main works well, but in 2.x, we can not read a http entity twice. The entity is a stream, if read twice, the result is null. We can solve this by cache the result and read it only once 28bfc01.
Although in main it works well, we can also modify this to keep it consistent between main and 2.x. If we modify some code in the future, this issue will not be a blocker for auto backport.

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
@zhichao-aws
Copy link
Member Author

No need to backport, the fix is already in 2.x

Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (34ae75f) 81.29% compared to head (dc384ba) 81.29%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #94   +/-   ##
=========================================
  Coverage     81.29%   81.29%           
  Complexity      152      152           
=========================================
  Files            12       12           
  Lines           882      882           
  Branches        115      115           
=========================================
  Hits            717      717           
  Misses          106      106           
  Partials         59       59           

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

@zane-neo zane-neo merged commit ec53045 into opensearch-project:main Jan 3, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants