Skip to content

Add regression test for NettyChannel cleanup on repeated disconnects#16068

Open
SURYAS1306 wants to merge 1 commit intoapache:3.3from
SURYAS1306:test/nettychannel-cleanup-regression
Open

Add regression test for NettyChannel cleanup on repeated disconnects#16068
SURYAS1306 wants to merge 1 commit intoapache:3.3from
SURYAS1306:test/nettychannel-cleanup-regression

Conversation

@SURYAS1306
Copy link
Contributor

What is the purpose of the change?

This PR adds a regression test to validate the NettyChannel lifecycle cleanup behavior.
The test ensures that channels can be safely removed and re-created across repeated
add/remove cycles, preventing channel map leaks observed in issue #16054.

What is changed?

  • Added a unit test in NettyChannelTest to cover repeated channel add/remove scenarios.

Checklist

  • The issue has been investigated and is already fixed in the codebase
  • Added a regression test to prevent future regressions
  • All tests pass locally

@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.75%. Comparing base (f27d0d7) to head (5f7c374).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16068      +/-   ##
============================================
- Coverage     60.75%   60.75%   -0.01%     
+ Complexity    11751    11750       -1     
============================================
  Files          1951     1951              
  Lines         88992    88992              
  Branches      13418    13418              
============================================
- Hits          54070    54063       -7     
- Misses        29362    29367       +5     
- Partials       5560     5562       +2     
Flag Coverage Δ
integration-tests-java21 32.17% <ø> (-0.02%) ⬇️
integration-tests-java8 32.30% <ø> (+<0.01%) ⬆️
samples-tests-java21 32.18% <ø> (-0.02%) ⬇️
samples-tests-java8 29.87% <ø> (+<0.01%) ⬆️
unit-tests-java11 59.01% <ø> (-0.01%) ⬇️
unit-tests-java17 58.49% <ø> (+<0.01%) ⬆️
unit-tests-java21 58.49% <ø> (-0.02%) ⬇️
unit-tests-java25 58.48% <ø> (+<0.01%) ⬆️
unit-tests-java8 59.01% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

headerReceived = true;
transportError = validateHeaderStatus(headers);

if (transportError != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why add such codes?

@SURYAS1306
Copy link
Contributor Author

Thanks for pointing this out.

That change is not related to the NettyChannel regression test and should not be part of this PR. It was brought in unintentionally from earlier local branch history.

I’ll clean up the PR to keep it focused only on the NettyChannel regression test.

@SURYAS1306 SURYAS1306 force-pushed the test/nettychannel-cleanup-regression branch from 52e74ff to 5f7c374 Compare February 4, 2026 09:30
@SURYAS1306
Copy link
Contributor Author

SURYAS1306 commented Feb 4, 2026

Thanks for the review @zrlw ,

I’ve cleaned up the PR history to remove the unrelated commits.
This PR now contains only a single commit that adds the NettyChannel regression test
covering repeated add/remove scenarios (no functional changes).

All checks pass locally and in CI.

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.

3 participants