Skip to content
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

Refactoring Metadata Unit Tests #15089

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

Conversation

heliang666s
Copy link
Contributor

What is the purpose of the change?

Refactoring Metadata Unit Tests

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 Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.82%. Comparing base (bc729af) to head (cb91ad9).

Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #15089      +/-   ##
============================================
- Coverage     58.83%   58.82%   -0.01%     
  Complexity       12       12              
============================================
  Files          1883     1883              
  Lines         86013    86013              
  Branches      12886    12886              
============================================
- Hits          50602    50601       -1     
- Misses        29881    29884       +3     
+ Partials       5530     5528       -2     
Flag Coverage Δ
unit-tests 58.82% <ø> (-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.

* Uses Map<String, String> to simulate ZK node storage:
* key corresponds to the ZK node path, and value corresponds to the node content.
*/
private final Map<String, String> zkDataStore = new ConcurrentHashMap<>();
Copy link
Member

Choose a reason for hiding this comment

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

Now that we've mocked ZookeeperClient, I think we can simulate the return result directly without actually storing it and spread the setUp logic across each unit test.

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.

3 participants