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

[improve] Add test for MemcachedCollectImpl #2044

Merged
merged 4 commits into from
May 29, 2024

Conversation

zuobiao-zhou
Copy link
Member

What's changed?

Add test for MemcachedCollectImpl.

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

@Mock
MemcachedProtocol memcachedProtocol;

@Mock
Copy link
Contributor

Choose a reason for hiding this comment

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

hi, I think it's no need to mock metrics and builder. Because it just create a real object passed as a parameter to the method, the method uses the real object and does not need to simulate the object behavior. Just use it as a variable☺️.

@tomsun28 tomsun28 added the good first pull request Good for newcomers label May 29, 2024
Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

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

lgtm!

@tomsun28 tomsun28 merged commit 2648613 into apache:master May 29, 2024
3 checks passed
@zuobiao-zhou zuobiao-zhou deleted the memcached-test branch May 30, 2024 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants