Skip to content

Simplify MockClusterInvoker fail mock tests#16328

Open
gaoxiaolei-s59 wants to merge 1 commit into
apache:3.3from
gaoxiaolei-s59:codex/simplify-mock-cluster-invoker-test-v2
Open

Simplify MockClusterInvoker fail mock tests#16328
gaoxiaolei-s59 wants to merge 1 commit into
apache:3.3from
gaoxiaolei-s59:codex/simplify-mock-cluster-invoker-test-v2

Conversation

@gaoxiaolei-s59

Copy link
Copy Markdown

What is the purpose of the change

Simplify MockClusterInvokerTest by replacing broad try/catch assertions with focused assertThrows checks and extracting a shared helper for the fail-mock invoker setup.

Supersedes #16327, which was recreated after repeated unrelated integration CI failures in the test image setup.

Brief changelog

  • Split the fail-mock-without-default test into focused cases for getSomething and an unconfigured method.
  • Added a helper for the repeated fail-mock invoker construction.
  • Replaced empty catch blocks with Assertions.assertThrows.

Verifying this change

  • ./mvnw -pl dubbo-cluster -Dtest=MockClusterInvokerTest test
  • ./mvnw -pl dubbo-cluster test

@gaoxiaolei-s59 gaoxiaolei-s59 force-pushed the codex/simplify-mock-cluster-invoker-test-v2 branch from 101b61c to 9ca056f Compare June 10, 2026 07:43
@codecov-commenter

codecov-commenter commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16328      +/-   ##
============================================
- Coverage     60.79%   60.79%   -0.01%     
+ Complexity    11777    11768       -9     
============================================
  Files          1953     1953              
  Lines         89208    89208              
  Branches      13458    13458              
============================================
- Hits          54234    54231       -3     
- Misses        29403    29407       +4     
+ Partials       5571     5570       -1     
Flag Coverage Δ
integration-tests-java21 32.11% <ø> (-0.01%) ⬇️
integration-tests-java8 32.27% <ø> (-0.05%) ⬇️
samples-tests-java21 32.20% <ø> (+0.08%) ⬆️
samples-tests-java8 29.86% <ø> (-0.01%) ⬇️
unit-tests-java11 59.04% <ø> (+0.01%) ⬆️
unit-tests-java17 58.50% <ø> (-0.02%) ⬇️
unit-tests-java21 58.51% <ø> (+<0.01%) ⬆️
unit-tests-java25 58.46% <ø> (-0.02%) ⬇️
unit-tests-java8 59.07% <ø> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

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.

2 participants