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

Drain HttpResponse in tests #5852

Merged
merged 2 commits into from
Apr 10, 2024
Merged

Conversation

ikhoon
Copy link
Contributor

@ikhoon ikhoon commented Apr 2, 2024

Description

In Armeria CI, we saw Netty leak reports from kubernetes-client CI tests. After investigating, I found out that some of the tests did not consume HttpResponse. As a result, ByteBufs were not subscribed to and remained in the Publisher's internal buffer.

I fixed to call AsyncBody.consume() in tests where it was not called before.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

Motivation:

In Armeria CI, we saw Netty leak reports from kubernetes-client CI tests.
After investigating, I found out that some of the tests did not
consume `HttpResponse`. As a result, some `ByteBuf`s were not
subscribed to and remained in the Publisher's internal buffer.

Modifications:

- Fixed to call `AsyncBody.consume()` where it was not called before.

Result:

No more leaks in CI builds.
@rohanKanojia
Copy link
Member

@ikhoon : Could you please run mvn spotless:apply to fix style failures

@ikhoon
Copy link
Contributor Author

ikhoon commented Apr 2, 2024

@ikhoon : Could you please run mvn spotless:apply to fix style failures

I've done.

Copy link

sonarqubecloud bot commented Apr 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@shawkins shawkins left a comment

Choose a reason for hiding this comment

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

LGTM

@manusa manusa added this to the 6.12.0 milestone Apr 9, 2024 — with automated-tasks
Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM, thx!

@manusa manusa merged commit dd53202 into fabric8io:main Apr 10, 2024
17 of 19 checks passed
@ikhoon ikhoon deleted the drain-response-in-test branch December 7, 2024 04:03
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.

5 participants