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

Add unit tests for GetWorkflowExecution #5736

Merged
merged 4 commits into from
Mar 7, 2024

Conversation

Shaddoll
Copy link
Member

@Shaddoll Shaddoll commented Mar 6, 2024

What changed?
Add unit tests for GetWorkflowExecution

Why?
Improve test coverage

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Merging #5736 (73afe5b) into master (bc5cc93) will increase coverage by 0.06%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

❗ Current head 73afe5b differs from pull request most recent head 2a87b11. Consider uploading reports for the commit 2a87b11 to get more accurate results

Additional details and impacted files

see 12 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 c41bd68...2a87b11. Read the comment docs.

},
},
mockSetup: func(db *sqlplugin.MockDB, parser *serialization.MockParser) {
db.EXPECT().SelectFromExecutions(gomock.Any(), gomock.Any()).Return([]sqlplugin.ExecutionsRow{
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be easier to use a mock sql like https://github.com/DATA-DOG/go-sqlmock rather than a gomocked entity.

@coveralls
Copy link

coveralls commented Mar 6, 2024

Pull Request Test Coverage Report for Build 018e1699-1424-4592-bcbc-1234516091cb

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 26 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.06%) to 63.86%

Files with Coverage Reduction New Missed Lines %
common/task/weighted_round_robin_task_scheduler.go 1 88.06%
tools/cli/admin_db_decode_thrift.go 1 71.79%
service/history/task/timer_task_executor_base.go 2 78.38%
service/history/task/transfer_active_task_executor.go 2 72.38%
service/history/task/task_util.go 20 70.57%
Totals Coverage Status
Change from base Build 018e1694-625a-41b7-8e9f-05b4c8370a15: 0.06%
Covered Lines: 93618
Relevant Lines: 146599

💛 - Coveralls

@Shaddoll Shaddoll merged commit ea4bc19 into cadence-workflow:master Mar 7, 2024
17 of 18 checks passed
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.

5 participants