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] clean up tests in history/decision/handler #5932

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

ketsiambaku
Copy link
Contributor

@ketsiambaku ketsiambaku commented Apr 23, 2024

What changed?

  1. The test functions were using both test suite and subtests which were confusing. The suite would not reset between subtests
TestHandleDecisionTaskFailed
TestHandleDecisionTaskScheduled
TestHandleDecisionTaskStarted

I changed it so these tests only use table format tests

  1. I found out that we already have predefined constants service/history/constants for test purposes. So I deleted the ones I created to use the existing ones

Why?
Make the tests easier to use or edit without potentially saving states between subtests

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

@coveralls
Copy link

Pull Request Test Coverage Report for Build 018f0b06-d43f-4a93-abe3-133e5e038450

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 96 unchanged lines in 13 files lost coverage.
  • Overall coverage decreased (-0.05%) to 67.656%

Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 2 89.05%
common/persistence/execution_manager.go 2 83.74%
service/matching/taskListManager.go 2 79.9%
service/history/execution/mutable_state_util.go 2 78.52%
common/persistence/statsComputer.go 2 96.07%
common/persistence/historyManager.go 2 66.67%
service/history/task/fetcher.go 5 85.57%
service/history/task/transfer_standby_task_executor.go 6 86.63%
common/task/fifo_task_scheduler.go 7 82.47%
service/history/task/cross_cluster_task_processor.go 8 80.79%
Totals Coverage Status
Change from base Build 018f0909-5e23-428f-90ff-d01162e02ac3: -0.05%
Covered Lines: 99081
Relevant Lines: 146448

💛 - Coveralls

@ketsiambaku ketsiambaku merged commit a4735e8 into cadence-workflow:master Apr 23, 2024
18 checks passed
@ketsiambaku ketsiambaku deleted the test-cleanup branch April 23, 2024 13:50
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