Skip to content

Conversation

@LI123456mo
Copy link
Contributor

This PR adds unit test coverage for the ConcurrentHashSet utility class.

Changes:

Added ConcurrentHashSetTest.java with tests for add(), remove(), contains(), size(), and iterator().

Verified that the set correctly handles duplicate elements.

Note to Maintainer: This is a clean PR based on a fresh checkout of the 3.3 branch. The previous PR (#16013) was closed due to branch pollution; this version contains only the changes related to ConcurrentHashSet.

All tests passed locally using mvn clean test -Dtest=ConcurrentHashSetTest -pl dubbo-common.

@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.74%. Comparing base (a92d5d0) to head (12f3387).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16024      +/-   ##
============================================
- Coverage     60.75%   60.74%   -0.01%     
+ Complexity    11736    11733       -3     
============================================
  Files          1949     1949              
  Lines         88801    88801              
  Branches      13391    13391              
============================================
- Hits          53952    53945       -7     
+ Misses        29314    29312       -2     
- Partials       5535     5544       +9     
Flag Coverage Δ
integration-tests-java21 32.21% <ø> (ø)
integration-tests-java8 32.30% <ø> (-0.06%) ⬇️
samples-tests-java21 32.16% <ø> (+0.04%) ⬆️
samples-tests-java8 29.74% <ø> (+0.02%) ⬆️
unit-tests-java11 59.02% <ø> (-0.02%) ⬇️
unit-tests-java17 58.52% <ø> (+0.01%) ⬆️
unit-tests-java21 58.51% <ø> (ø)
unit-tests-java25 58.46% <ø> (-0.03%) ⬇️
unit-tests-java8 59.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.

Copy link
Contributor

@zrlw zrlw left a comment

Choose a reason for hiding this comment

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

LGTM

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