Skip to content

Fix order-sensitive thread pool status test#16300

Open
yuzhiyang1 wants to merge 1 commit into
apache:3.3from
yuzhiyang1:codex/fix-threadpool-status-checker-test-order
Open

Fix order-sensitive thread pool status test#16300
yuzhiyang1 wants to merge 1 commit into
apache:3.3from
yuzhiyang1:codex/fix-threadpool-status-checker-test-order

Conversation

@yuzhiyang1
Copy link
Copy Markdown

What changed

  • Updated ThreadPoolStatusCheckerTest to assert pool status entries independently instead of relying on DataStore map iteration order.
  • Added cleanup in a finally block so executors and DataStore entries are reset even if an assertion fails.

Why

NonDex can shuffle the internal map iteration order, which makes the previous full-message equality assertion flaky even though the checker result is semantically correct.

Fixes #16152

Validation

  • .\mvnw.cmd test -pl dubbo-rpc/dubbo-rpc-dubbo '-Dtest=org.apache.dubbo.rpc.protocol.dubbo.status.ThreadPoolStatusCheckerTest#test' '-Dcheckstyle.skip=true' '-Drat.skip=true'
  • .\mvnw.cmd edu.illinois:nondex-maven-plugin:2.2.1:nondex -pl dubbo-rpc/dubbo-rpc-dubbo '-Dtest=org.apache.dubbo.rpc.protocol.dubbo.status.ThreadPoolStatusCheckerTest#test' -DnondexRuns=10

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.79%. Comparing base (b65573e) to head (f76451e).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16300      +/-   ##
============================================
- Coverage     60.80%   60.79%   -0.02%     
+ Complexity    11766    11765       -1     
============================================
  Files          1953     1953              
  Lines         89188    89188              
  Branches      13454    13454              
============================================
- Hits          54235    54223      -12     
- Misses        29391    29399       +8     
- Partials       5562     5566       +4     
Flag Coverage Δ
integration-tests-java21 32.16% <ø> (+0.03%) ⬆️
integration-tests-java8 32.24% <ø> (+<0.01%) ⬆️
samples-tests-java21 32.12% <ø> (-0.07%) ⬇️
samples-tests-java8 29.85% <ø> (-0.02%) ⬇️
unit-tests-java11 59.02% <ø> (-0.03%) ⬇️
unit-tests-java17 58.49% <ø> (-0.04%) ⬇️
unit-tests-java21 58.49% <ø> (+<0.01%) ⬆️
unit-tests-java25 58.46% <ø> (-0.02%) ⬇️
unit-tests-java8 59.01% <ø> (+<0.01%) ⬆️

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.

@yuzhiyang1 yuzhiyang1 marked this pull request as ready for review June 1, 2026 10:26
@yuzhiyang1 yuzhiyang1 changed the title [codex] Fix order-sensitive thread pool status test Fix order-sensitive thread pool status test Jun 1, 2026
@zrlw
Copy link
Copy Markdown
Contributor

zrlw commented Jun 2, 2026

Hope this one will be approved by two committers,
#16153 and #16154 did the same thing.

Copy link
Copy Markdown
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.

[Bug] ThreadPoolStatusCheckerTest#test fails when collection order is shuffled with NonDex

3 participants