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

Improve test coverage for constants.go #5685

Merged
merged 6 commits into from
Feb 22, 2024

Conversation

timl3136
Copy link
Member

What changed?
Add unit tests for IntKey, BoolKey, FloatKey, StringKey, MapKey, DurationKey, and ListKey.

Why?
improve test coverage

How did you test it?
unit test

Potential risks

Release notes

Documentation Changes

expectedDescription string
expectedFilters []Filter
}{
"TestGetIntPropertyKey": {
Copy link
Member

Choose a reason for hiding this comment

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

are you planning to cover the rest of the keys in follow up PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really as variable definition is not included in code coverage and including all keys will be essentially parsed structs in constants.go.

@coveralls
Copy link

coveralls commented Feb 22, 2024

Pull Request Test Coverage Report for Build 018dd2bc-79e9-4dee-8915-4c48de3531d2

Details

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

Files with Coverage Reduction New Missed Lines %
common/persistence/historyManager.go 2 66.67%
common/persistence/sql/sqlplugin/postgres/db.go 2 85.0%
common/persistence/sql/sqlplugin/postgres/task.go 2 73.4%
common/task/parallel_task_processor.go 2 93.06%
common/task/weighted_round_robin_task_scheduler.go 2 88.56%
service/history/task/fetcher.go 2 85.57%
service/history/task/transfer_standby_task_executor.go 2 87.42%
service/matching/matcher.go 2 90.72%
service/matching/taskListManager.go 2 79.7%
service/history/task/cross_cluster_task_processor.go 8 80.79%
Totals Coverage Status
Change from base Build 018dd233-35a0-491a-a1ed-ac3dde904d76: 0.07%
Covered Lines: 92853
Relevant Lines: 147803

💛 - Coveralls

@timl3136 timl3136 enabled auto-merge (squash) February 22, 2024 21:51
@timl3136 timl3136 merged commit 4d0407e into cadence-workflow:master Feb 22, 2024
17 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.

3 participants