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] Tests for Decision taskHandler #5951

Merged

Conversation

ketsiambaku
Copy link
Member

@ketsiambaku ketsiambaku commented Apr 28, 2024

What changed?

  • Added more tests for taskHandler functions
  • I'm Using handleDecisions() function in tests since it's lower in the call stack. This way we'll cover the switch statement in handleDecisions() as well as the different switch cases
  • Added comments for constants

Why?
improve code coverage in service/history/decision

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Apr 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.95%. Comparing base (b4481d8) to head (6c281fa).

Additional details and impacted files

see 10 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 b4481d8...6c281fa. Read the comment docs.

@ketsiambaku ketsiambaku marked this pull request as ready for review April 30, 2024 20:53
@ketsiambaku ketsiambaku changed the title [code-coverage] WIP [code-coverage] Tests for Decision taskHandler Apr 30, 2024
@ketsiambaku ketsiambaku enabled auto-merge (squash) May 1, 2024 08:09
@ketsiambaku ketsiambaku merged commit 906c4c9 into cadence-workflow:master May 1, 2024
19 of 20 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 018f3330-471d-4f16-bef1-993f9e9c248f

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 31 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+0.07%) to 68.136%

Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 1 89.05%
common/persistence/execution_manager.go 2 83.74%
common/task/fifo_task_scheduler.go 2 85.57%
common/util.go 2 91.78%
service/matching/taskListManager.go 2 80.65%
common/persistence/statsComputer.go 2 97.14%
service/history/task/transfer_standby_task_executor.go 4 86.21%
service/history/execution/mutable_state_task_refresher.go 7 62.03%
service/history/shard/context.go 9 69.08%
Totals Coverage Status
Change from base Build 018f3227-822d-447c-be93-57b83bc265d9: 0.07%
Covered Lines: 100045
Relevant Lines: 146831

💛 - Coveralls

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