test: Improve unit test coverage + fix Dubbo global state contamination#1549
Open
test: Improve unit test coverage + fix Dubbo global state contamination#1549
Conversation
This commit consolidates all unit test improvements made across the SOFA-RPC project. Modules with new or expanded tests: - core-impl: Router tests (RegistryRouter, DirectUrlRouter), Cluster tests, Filter tests - core/api: Exception handling and utility class tests - remoting-bolt: Transport and connection management tests - remoting-http: HTTP/2 transport and handler tests - remoting-resteasy: REST adapter and client builder tests - codec: Jackson and Fury serializer tests - registry: Consul, Mesh, Polaris registry implementation tests - bootstrap: REST, Triple, Dubbo bootstrap tests - tracer: OpenTracing REST and Triple tracer tests - fault-hystrix: Circuit breaker integration tests - doc-swagger: Swagger generator tests - compiler: Triple protocol code generator tests Test infrastructure improvements: - Added JUnit dependency to bootstrap-rest module - Fixed package declarations in ConsulConstantsTest - Removed duplicate and redundant test classes Final coverage: 393 test files / 578 source files = 0.68:1 ratio Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: sunhailin-Leo <17564655+sunhailin-Leo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix error in https://github.com/sofastack/sofa-rpc/pull/1548
Fix Dubbo global state contamination breaking DubooServerTest (PR #1548)
Mar 19, 2026
Copilot stopped work on behalf of
sunhailin-Leo due to an error
March 19, 2026 07:40
Copilot
AI
changed the title
Fix Dubbo global state contamination breaking DubooServerTest (PR #1548)
Fix Dubbo global state contamination breaking DubooServerTest
Mar 19, 2026
Copilot
AI
changed the title
Fix Dubbo global state contamination breaking DubooServerTest
Combine PR #1548 test improvements with Dubbo global state isolation fix
Mar 19, 2026
Copilot
AI
changed the title
Combine PR #1548 test improvements with Dubbo global state isolation fix
test: Improve unit test coverage + fix Dubbo global state contamination
Mar 19, 2026
sunhailin-Leo
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds comprehensive unit test coverage across multiple SOFA-RPC modules and fixes a test isolation bug in the Dubbo bootstrap tests where
FrameworkModelglobal state leaked between test classes when Surefire ran them in the same JVM.New test coverage
RegistryRouter,DirectUrlRouter,Cluster,FilterDubbo global state fix
DubboConsumerBootstrapTestandDubboProviderBootstrapTestwere initializing Dubbo'sFrameworkModelinSTRICTmode (the default), leavingApplicationConfigregistrations behind that causedDubboServerTestto fail when run in the same JVM.Added
@BeforeClass/@AfterClasslifecycle hooks to both classes:💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.