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

feat(varlogtest): create new instance of admin and log #591

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

ijsong
Copy link
Member

@ijsong ijsong commented Sep 25, 2023

What this PR does

This PR renames pkg/varlogtest.(*VarlogTest).Admin and pkg/varlogtest.(*VarlogTest).Log to pkg/varlogtest.(*VarlogTest).NewAdminClient and pkg/varlogtest.(*VarlogTest).NewLogClient respectively. It also makes them return a new instance of the admin client and the log client when invoked.
Previously, they returned the same instances, so callers shared them. However, it wasn't the right decision because the callers had to share the clients regardless of their needs.

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (c033d62) 61.28% compared to head (2c98f7f) 61.19%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                       Coverage Diff                       @@
##           varlogtest_initial_mr_nodes     #591      +/-   ##
===============================================================
- Coverage                        61.28%   61.19%   -0.09%     
===============================================================
  Files                              144      144              
  Lines                            19184    19182       -2     
===============================================================
- Hits                             11757    11739      -18     
- Misses                            6841     6858      +17     
+ Partials                           586      585       -1     
Files Coverage Δ
pkg/varlogtest/varlogtest.go 90.32% <100.00%> (-0.21%) ⬇️
pkg/varlogtest/admin.go 45.32% <50.00%> (ø)
pkg/varlogtest/log.go 71.64% <66.66%> (ø)

... and 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This PR renames `pkg/varlogtest.(*VarlogTest).Admin` and `pkg/varlogtest.(*VarlogTest).Log` to
`pkg/varlogtest.(*VarlogTest).NewAdminClient` and `pkg/varlogtest.(*VarlogTest).NewLogClient`
respectively. It also makes them return a new instance of the admin client and the log client when
invoked.
Previously, they returned the same instances, so callers shared them. However, it wasn't the right
decision because the callers had to share the clients regardless of their needs.
@ijsong
Copy link
Member Author

ijsong commented Oct 4, 2023

Merge Activity

  • Oct 4, 3:30 AM: @ijsong started a stack merge that includes this pull request via Graphite.
  • Oct 4, 3:32 AM: @ijsong merged this pull request with Graphite.

Base automatically changed from varlogtest_initial_mr_nodes to main October 4, 2023 07:32
@ijsong ijsong merged commit 385446d into main Oct 4, 2023
@ijsong ijsong deleted the varlogtest_create_new_instance branch October 4, 2023 07:32
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