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

tools/cli: reducing unnecessary closures #6090

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

Groxx
Copy link
Member

@Groxx Groxx commented Jun 3, 2024

Pretty simple change: these closures don't actually buy us anything, but they do make coverage more annoying to gather because we don't call the closure.
So just get rid of the closures. Shorter and free coverage.

@Groxx
Copy link
Member Author

Groxx commented Jun 3, 2024

Difftastic makes this quite easy to check by hand:
Screenshot 2024-06-03 at 17 49 15

Copy link

codecov bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.97%. Comparing base (84ab621) to head (87142e1).

Additional details and impacted files
Files Coverage Δ
tools/cli/admin.go 98.35% <100.00%> (+31.49%) ⬆️
tools/cli/cluster.go 100.00% <100.00%> (ø)
tools/cli/task_list.go 100.00% <100.00%> (+13.63%) ⬆️
tools/cli/workflow.go 100.00% <100.00%> (+32.06%) ⬆️

... and 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84ab621...87142e1. Read the comment docs.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 018fe06f-9837-4a7b-a8fa-d60958d36128

Details

  • 112 of 112 (100.0%) changed or added relevant lines in 4 files are covered.
  • 88 unchanged lines in 17 files lost coverage.
  • Overall coverage increased (+0.3%) to 70.075%

Files with Coverage Reduction New Missed Lines %
service/matching/tasklist/db.go 2 73.23%
common/peerprovider/ringpopprovider/config.go 2 81.58%
common/task/fifo_task_scheduler.go 2 87.63%
common/persistence/sql/sqlplugin/mysql/task.go 2 73.68%
service/history/task/transfer_active_task_executor.go 2 72.79%
common/persistence/sql/sqlplugin/mysql/db.go 2 79.49%
common/log/tag/tags.go 3 50.46%
service/history/handler/handler.go 3 96.2%
common/persistence/statsComputer.go 3 98.21%
service/frontend/api/handler.go 4 62.5%
Totals Coverage Status
Change from base Build 018fe051-df14-4702-b515-0388c6db07f3: 0.3%
Covered Lines: 104369
Relevant Lines: 148939

💛 - Coveralls

@Groxx Groxx merged commit 6a44f0a into cadence-workflow:master Jun 4, 2024
20 checks passed
@Groxx Groxx deleted the cli-tests branch June 4, 2024 00:24
timl3136 pushed a commit to timl3136/cadence that referenced this pull request Jun 6, 2024
Pretty simple change: these closures don't actually buy us anything, but they do make coverage more annoying to gather because we don't call the closure.
So just get rid of the closures. Shorter and free coverage.
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