Skip to content

Feature/triple http3 cleanup fix #15347

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

Open
wants to merge 5 commits into
base: 3.3
Choose a base branch
from

Conversation

ankitshokeen
Copy link
Contributor

What is the purpose of the change?

This pull request resolves the duplicate service mapping warnings observed during the execution of TripleHttp3ProtocolTest.
It ensures that each test is executed in a fully isolated environment by resetting both the ApplicationModel and FrameworkModel before initializing test logic.
By clearing previously registered services and protocol instances, this change guarantees cleaner test runs without interference or unexpected warnings.

Checklist

  • Make sure there is a GitHub_issue field for the change.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?

@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.74%. Comparing base (c393896) to head (c746c3e).
Report is 25 commits behind head on 3.3.

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15347      +/-   ##
============================================
- Coverage     60.76%   60.74%   -0.03%     
+ Complexity    10916    10909       -7     
============================================
  Files          1886     1886              
  Lines         86127    86145      +18     
  Branches      12903    12906       +3     
============================================
- Hits          52335    52327       -8     
- Misses        28335    28361      +26     
  Partials       5457     5457              
Flag Coverage Δ
integration-tests 33.13% <ø> (+<0.01%) ⬆️
samples-tests 29.35% <ø> (-0.01%) ⬇️
unit-tests 58.86% <ø> (-0.04%) ⬇️

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.

.getBean(DefaultRequestMappingRegistry.class);
if (registry != null) {
registry.destroy();
System.out.println("DefaultRequestMappingRegistry destroyed after test");
Copy link
Member

Choose a reason for hiding this comment

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

System.out in ut is useless and please use logger instead

}
} catch (Exception e) {
System.err.println("Cleanup error: " + e.getMessage());
}
Copy link
Member

Choose a reason for hiding this comment

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

Exception should be thrown instead of just logging the error.

@ankitshokeen ankitshokeen requested review from mytang0 and AlbumenJ May 8, 2025 04:09
@oxsean
Copy link
Contributor

oxsean commented May 8, 2025

@ankitshokeen I think the root cause is that DefaultRequestMappingRegistry as a bean, is not properly destroyed. It needs to implement org.apache.dubbo.common.resource.Disposable so that it can be destroyed together when the ApplicationModel is destroyed.

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