Skip to content

Fix socket interceptor and add unit test#17784

Merged
andrross merged 1 commit intoopensearch-project:mainfrom
andrross:add-socket-channel-test
Apr 3, 2025
Merged

Fix socket interceptor and add unit test#17784
andrross merged 1 commit intoopensearch-project:mainfrom
andrross:add-socket-channel-test

Conversation

@andrross
Copy link
Copy Markdown
Member

@andrross andrross commented Apr 3, 2025

The optimization of using a Stream instead of a Collection caused problems with class not found and/or illegal access errors when using the lambda function in the Stream::forEach call in the intercept method.

FYI @RajatGupta02

Check List

  • Functionality includes testing.

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.

The optimization of using a Stream instead of a Collection caused problems
with class not found and/or illegal access errors when using the lambda function
in the `Stream::forEach` call in the intercept method.

Signed-off-by: Andrew Ross <andrross@amazon.com>
@reta
Copy link
Copy Markdown
Contributor

reta commented Apr 3, 2025

Thanks @andrross , was about to send the fix as well

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2025

❌ Gradle check result for 0c0a349: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2025

❌ Gradle check result for 0c0a349: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2025

❕ Gradle check result for 0c0a349: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 72.35%. Comparing base (5f1b4ab) to head (0c0a349).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...opensearch/javaagent/SocketChannelInterceptor.java 0.00% 5 Missing ⚠️
...ent/StackCallerProtectionDomainChainExtractor.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17784      +/-   ##
============================================
+ Coverage     72.32%   72.35%   +0.03%     
+ Complexity    66005    65987      -18     
============================================
  Files          5356     5358       +2     
  Lines        306446   306485      +39     
  Branches      44395    44406      +11     
============================================
+ Hits         221634   221768     +134     
+ Misses        66660    66543     -117     
- Partials      18152    18174      +22     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants