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 more tests for service/history/decision package #5909

Conversation

ketsiambaku
Copy link
Member

@ketsiambaku ketsiambaku commented Apr 15, 2024

What changed?

  • Generated mock for service/history/query/registry interface
  • Cover additional scenarios in HandleBufferedQueries API
  • Added tests for CreateRecordDecisionTaskStartedResponse API
  • Added more tests for HandleDecisionTaskStarted API

Why?
improve code coverage in service/history/decision

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

@ketsiambaku ketsiambaku changed the title generate mock for history query registry and add more test cases in d… [code-coverage] Add more tests for service/history/decision package Apr 15, 2024
@ketsiambaku ketsiambaku marked this pull request as ready for review April 15, 2024 19:40
@coveralls
Copy link

coveralls commented Apr 15, 2024

Pull Request Test Coverage Report for Build 018ef35f-a075-4cbc-8279-bb7c9013309d

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 41 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+0.03%) to 67.568%

Files with Coverage Reduction New Missed Lines %
service/history/task/transfer_standby_task_executor.go 2 86.21%
common/task/weighted_round_robin_task_scheduler.go 2 88.56%
common/task/parallel_task_processor.go 2 93.06%
service/history/execution/mutable_state_builder.go 2 71.09%
service/matching/matcher.go 2 90.72%
common/task/fifo_task_scheduler.go 3 84.54%
service/history/task/fetcher.go 4 86.08%
common/persistence/pinot_visibility_triple_manager.go 9 97.65%
service/history/execution/mutable_state_task_refresher.go 15 62.03%
Totals Coverage Status
Change from base Build 018ef31e-0dee-4de8-b6fd-54e4f1f05b43: 0.03%
Covered Lines: 98945
Relevant Lines: 146438

💛 - Coveralls

}
for _, test := range tests {
s.Run(test.name, func() {
core, observedLogs := observer.New(zap.ErrorLevel)
Copy link
Member

Choose a reason for hiding this comment

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

oh nice! I didn't know about this

@ketsiambaku ketsiambaku enabled auto-merge (squash) April 18, 2024 07:41
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

Merging #5909 (0e20058) into master (6564701) will increase coverage by 0.04%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

❗ Current head 0e20058 differs from pull request most recent head b47a717. Consider uploading reports for the commit b47a717 to get more accurate results

Additional details and impacted files
Files Coverage Δ
service/history/query/registry.go 91.58% <ø> (ø)

... and 6 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 16c4775...b47a717. Read the comment docs.

@ketsiambaku ketsiambaku merged commit fd9cf96 into cadence-workflow:master Apr 18, 2024
18 checks passed
@ketsiambaku ketsiambaku deleted the history-decision-handledecisiontaskstarted branch April 26, 2024 17:16
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