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

Write tests for cdb.InsertWorkflowExecutionWithTasks #5688

Conversation

taylanisikdemir
Copy link
Member

What changed?

InsertWorkflowExecutionWithTasks had 0 test coverage. It calls bunch of other helper functions which are recently covered by tests in workflow_utils_test.go. This PR covers InsertWorkflowExecutionWithTasks without going too deep.

Misc change: Some of the helper functions had error returns in the signature but always return nil. Updated signature and callers.

Why?
Increase coverage.

@coveralls
Copy link

coveralls commented Feb 23, 2024

Pull Request Test Coverage Report for Build 018dd436-ad2f-4733-b6d9-7c350ce72b46

Details

  • -2 of 16 (87.5%) changed or added relevant lines in 2 files are covered.
  • 39 unchanged lines in 10 files lost coverage.
  • Overall coverage increased (+0.006%) to 62.86%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/persistence/nosql/nosqlplugin/cassandra/workflow.go 10 12 83.33%
Files with Coverage Reduction New Missed Lines %
common/peerprovider/ringpopprovider/config.go 2 81.58%
common/task/weighted_round_robin_task_scheduler.go 2 89.05%
service/frontend/api/handler.go 2 62.05%
service/history/execution/mutable_state_util.go 2 37.63%
service/history/task/transfer_active_task_executor.go 2 72.38%
service/history/task/transfer_standby_task_executor.go 2 87.01%
service/matching/taskListManager.go 2 80.46%
common/archiver/filestore/historyArchiver.go 4 80.95%
service/frontend/wrappers/metered/metered.go 9 62.02%
common/persistence/sql/workflowStateMaps.go 12 82.97%
Totals Coverage Status
Change from base Build 018dd39f-cad6-4614-851d-0823a418fc57: 0.006%
Covered Lines: 92893
Relevant Lines: 147777

💛 - Coveralls

@taylanisikdemir taylanisikdemir enabled auto-merge (squash) February 23, 2024 04:26
@taylanisikdemir taylanisikdemir merged commit 2c5fc9f into cadence-workflow:master Feb 23, 2024
17 checks passed
@taylanisikdemir taylanisikdemir deleted the taylan/insertwfexecwithtasks_test branch February 23, 2024 04:54
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