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] Add tests for history decision task handler #6060

Merged
merged 1 commit into from
May 28, 2024

Conversation

ketsiambaku
Copy link
Member

What changed?
Introduced the following tests in service/history/decision:

  • TestHandleDecisionRecordMarker

  • TestHandleDecisionScheduleActivity

  • TestHandleDecisionCancelWorkflow

Why?
improve code coverage in the package

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.99%. Comparing base (edc5880) to head (22bfd07).
Report is 3 commits behind head on master.

Additional details and impacted files

see 11 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 edc5880...22bfd07. Read the comment docs.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 018fabc6-df68-4d1a-b108-9517f6a6deb1

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 116 unchanged lines in 15 files lost coverage.
  • Overall coverage increased (+0.02%) to 69.5%

Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 2 89.05%
service/matching/tasklist/task_list_manager.go 2 76.48%
common/persistence/sql/sqlplugin/mysql/task.go 2 73.68%
service/history/task/transfer_active_task_executor.go 2 72.72%
service/matching/tasklist/matcher.go 2 88.66%
service/history/task/fetcher.go 2 85.57%
common/persistence/sql/sqlplugin/mysql/db.go 2 79.49%
service/worker/scanner/executor/runq.go 3 85.48%
common/archiver/filestore/historyArchiver.go 4 80.95%
service/frontend/api/handler.go 6 62.2%
Totals Coverage Status
Change from base Build 018faadd-0f68-4f46-a937-a0c09b154ebd: 0.02%
Covered Lines: 102455
Relevant Lines: 147418

💛 - Coveralls

expectMockCalls: func(taskHandler *taskHandlerImpl, attr *types.CancelWorkflowExecutionDecisionAttributes) {
taskHandler.hasUnhandledEventsBeforeDecisions = true
},
asserts: func(t *testing.T, taskHandler *taskHandlerImpl, attr *types.CancelWorkflowExecutionDecisionAttributes, err error) {
Copy link
Member

Choose a reason for hiding this comment

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

very fancy, easy to read though, nice!

@ketsiambaku ketsiambaku merged commit b4a3f3f into cadence-workflow:master May 28, 2024
20 checks passed
timl3136 pushed a commit to timl3136/cadence that referenced this pull request Jun 6, 2024
Introduced the following tests in service/history/decision:

TestHandleDecisionRecordMarker

TestHandleDecisionScheduleActivity

TestHandleDecisionCancelWorkflow
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.

4 participants