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

[code-coverage] Introduced first set of tests for taskHandler in service/history/decision #5960

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

ketsiambaku
Copy link
Member

What changed?

  • Added last set of tests cases for HandleDecisionTaskCompleted
  • Introduced tests for the taskHandler

Why?
Improve code coverage in service/history/decision folder

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.32%. Comparing base (95a0c1e) to head (79d97ae).

Additional details and impacted files

see 8 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 95a0c1e...79d97ae. Read the comment docs.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 018f2ef9-362a-478e-9ada-1d35f9bdcb2a

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 19 unchanged lines in 8 files lost coverage.
  • Overall coverage increased (+0.05%) to 67.935%

Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 1 89.05%
service/history/task/transfer_standby_task_executor.go 2 86.42%
common/peerprovider/ringpopprovider/config.go 2 81.58%
tools/cli/admin_db_decode_thrift.go 2 70.51%
common/persistence/historyManager.go 2 66.67%
service/history/task/timer_standby_task_executor.go 3 85.63%
service/history/task/fetcher.go 3 86.6%
service/frontend/wrappers/metered/metered.go 4 66.67%
Totals Coverage Status
Change from base Build 018f2ee9-0353-45b7-a8ea-2317acb3549d: 0.05%
Covered Lines: 99749
Relevant Lines: 146831

💛 - Coveralls

Comment on lines +98 to +102
assert.Equal(t, func(i int32) *types.DecisionTaskFailedCause {
cause := new(types.DecisionTaskFailedCause)
*cause = types.DecisionTaskFailedCause(i)
return cause
}(9), taskHandler.failDecisionCause)
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a trick. Why two assignments are required? And where 9 is coming from?

@ketsiambaku ketsiambaku merged commit bf088f2 into cadence-workflow:master Apr 30, 2024
20 checks passed
@ketsiambaku ketsiambaku deleted the history-decision branch April 30, 2024 20:41
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